<!doctype html><html lang="en">
 <head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  <title>CSS Page Floats</title>
  <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
  <meta content="exploring" name="csswg-work-status">
  <meta content="ED" name="w3c-status">
  <meta content="This document describes floats that move to the top or bottom of content  passages. This feature has traditionally been used in print  publications in which figures and photos are moved to the top or bottom  of columns or pages, along with their captions.  This draft describes how to achieve this effects for floats within pages,  columns, regions and elements." name="abstract">
  <link href="../default.css" rel="stylesheet" type="text/css">
  <link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
<style>
  body {
    background: url("https://www.w3.org/StyleSheets/TR/logo-ED") top left no-repeat;
  }
  </style>
  <link href="https://www.w3.org/TR/css-page-floats-3/" rel="canonical">
<style>/* style-md-lists */

/* This is a weird hack for me not yet following the commonmark spec
   regarding paragraph and lists. */
[data-md] > :first-child {
    margin-top: 0;
}
[data-md] > :last-child {
    margin-bottom: 0;
}</style>
<style>/* style-counters */

body {
    counter-reset: example figure issue;
}
.issue {
    counter-increment: issue;
}
.issue:not(.no-marker)::before {
    content: "Issue " counter(issue);
}

.example {
    counter-increment: example;
}
.example:not(.no-marker)::before {
    content: "Example " counter(example);
}
.invalid.example:not(.no-marker)::before,
.illegal.example:not(.no-marker)::before {
    content: "Invalid Example" counter(example);
}

figcaption {
    counter-increment: figure;
}
figcaption:not(.no-marker)::before {
    content: "Figure " counter(figure) " ";
}</style>
<style>/* style-dfn-panel */

.dfn-panel {
    position: absolute;
    z-index: 35;
    height: auto;
    width: -webkit-fit-content;
    width: fit-content;
    max-width: 300px;
    max-height: 500px;
    overflow: auto;
    padding: 0.5em 0.75em;
    font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
    background: #DDDDDD;
    color: black;
    border: outset 0.2em;
}
.dfn-panel:not(.on) { display: none; }
.dfn-panel * { margin: 0; padding: 0; text-indent: 0; }
.dfn-panel > b { display: block; }
.dfn-panel a { color: black; }
.dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; }
.dfn-panel > b + b { margin-top: 0.25em; }
.dfn-panel ul { padding: 0; }
.dfn-panel li { list-style: inside; }
.dfn-panel.activated {
    display: inline-block;
    position: fixed;
    left: .5em;
    bottom: 2em;
    margin: 0 auto;
    max-width: calc(100vw - 1.5em - .4em - .5em);
    max-height: 30vh;
}

.dfn-paneled { cursor: pointer; }
</style>
<style>/* style-selflinks */

.heading, .issue, .note, .example, li, dt {
    position: relative;
}
a.self-link {
    position: absolute;
    top: 0;
    left: calc(-1 * (3.5rem - 26px));
    width: calc(3.5rem - 26px);
    height: 2em;
    text-align: center;
    border: none;
    transition: opacity .2s;
    opacity: .5;
}
a.self-link:hover {
    opacity: 1;
}
.heading > a.self-link {
    font-size: 83%;
}
li > a.self-link {
    left: calc(-1 * (3.5rem - 26px) - 2em);
}
dfn > a.self-link {
    top: auto;
    left: auto;
    opacity: 0;
    width: 1.5em;
    height: 1.5em;
    background: gray;
    color: white;
    font-style: normal;
    transition: opacity .2s, background-color .2s, color .2s;
}
dfn:hover > a.self-link {
    opacity: 1;
}
dfn > a.self-link:hover {
    color: black;
}

a.self-link::before            { content: "¶"; }
.heading > a.self-link::before { content: "§"; }
dfn > a.self-link::before      { content: "#"; }</style>
<style>/* style-autolinks */

.css.css, .property.property, .descriptor.descriptor {
    color: #005a9c;
    font-size: inherit;
    font-family: inherit;
}
.css::before, .property::before, .descriptor::before {
    content: "‘";
}
.css::after, .property::after, .descriptor::after {
    content: "’";
}
.property, .descriptor {
    /* Don't wrap property and descriptor names */
    white-space: nowrap;
}
.type { /* CSS value <type> */
    font-style: italic;
}
pre .property::before, pre .property::after {
    content: "";
}
[data-link-type="property"]::before,
[data-link-type="propdesc"]::before,
[data-link-type="descriptor"]::before,
[data-link-type="value"]::before,
[data-link-type="function"]::before,
[data-link-type="at-rule"]::before,
[data-link-type="selector"]::before,
[data-link-type="maybe"]::before {
    content: "‘";
}
[data-link-type="property"]::after,
[data-link-type="propdesc"]::after,
[data-link-type="descriptor"]::after,
[data-link-type="value"]::after,
[data-link-type="function"]::after,
[data-link-type="at-rule"]::after,
[data-link-type="selector"]::after,
[data-link-type="maybe"]::after {
    content: "’";
}

[data-link-type].production::before,
[data-link-type].production::after,
.prod [data-link-type]::before,
.prod [data-link-type]::after {
    content: "";
}

[data-link-type=element],
[data-link-type=element-attr] {
    font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace;
    font-size: .9em;
}
[data-link-type=element]::before { content: "<" }
[data-link-type=element]::after  { content: ">" }

[data-link-type=biblio] {
    white-space: pre;
}</style>
 <body class="h-entry">
  <div class="head">
   <p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72"> </a> </p>
   <h1 class="p-name no-ref" id="title">CSS Page Floats</h1>
   <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="1970-01-01">1 January 1970</time></span></h2>
   <details>
    <summary>Specification Metadata</summary>
    <div data-fill-with="spec-metadata">
     <dl>
      <dt>This version:
      <dd><a class="u-url" href="https://drafts.csswg.org/css-page-floats/">https://drafts.csswg.org/css-page-floats/</a>
      <dt>Latest published version:
      <dd><a href="https://www.w3.org/TR/css-page-floats-3/">https://www.w3.org/TR/css-page-floats-3/</a>
      <dt>Previous Versions:
      <dd><a href="https://www.w3.org/TR/2015/WD-css-page-floats-3-20150915/" rel="prev">https://www.w3.org/TR/2015/WD-css-page-floats-3-20150915/</a>
      <dt class="editor">Editors:
      <dd class="editor p-author h-card vcard" data-editor-id="76051"><a class="p-name fn u-email email" href="mailto:johanneswilm@vivliostyle.com">Johannes Wilm</a> (<span class="p-org org">Vivliostyle</span>)
      <dd class="editor p-author h-card vcard" data-editor-id="43241"><a class="p-name fn u-url url" href="https://florian.rivoal.net">Florian Rivoal</a> (<span class="p-org org">Invited Expert</span>)
      <dd class="editor p-author h-card vcard" data-editor-id="81117"><a class="p-name fn u-url url" href="https://rachelandrew.co.uk">Rachel Andrew</a> (<span class="p-org org">Invited Expert</span>)
      <dt class="editor">Former Editor:
      <dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:howcome@opera.com">Håkon Wium Lie</a> (<span class="p-org org">Opera Software</span>)
      <dt>Suggest an Edit for this Spec:
      <dd><a href="https://github.com/w3c/csswg-drafts/blob/master/css-page-floats-3/Overview.bs">GitHub Editor</a>
      <dt>Issue Tracking:
      <dd><a href="https://github.com/w3c/csswg-drafts/labels/css-page-floats-3">GitHub Issues</a>
     </dl>
    </div>
   </details>
   <div data-fill-with="warning"></div>
   <p class="copyright" data-fill-with="copyright"><a href="https://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 1970 <a href="https://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="https://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="https://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="https://www.keio.ac.jp/">Keio</a>, <a href="https://ev.buaa.edu.cn/">Beihang</a>). W3C <a href="https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document">permissive document license</a> rules apply. </p>
   <hr title="Separator for header">
  </div>
  <div class="p-summary" data-fill-with="abstract">
   <h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
   <p>This document describes floats that move to the top or bottom of content

passages. This feature has traditionally been used in print
publications in which figures and photos are moved to the top or bottom
of columns or pages, along with their captions.
This draft describes how to achieve this effects for floats within pages,
columns, regions and elements.</p>
    <a href="https://www.w3.org/TR/CSS/">CSS</a> is a language for describing the rendering of structured documents
(such as HTML and XML)
on screen, on paper, etc. 
  </div>
  <h2 class="no-num no-toc no-ref heading settled" id="status"><span class="content">Status of this document</span></h2>
  <div data-fill-with="status">
   <p> This is a public copy of the editors’ draft.
	It is provided for discussion only and may change at any moment.
	Its publication here does not imply endorsement of its contents by W3C.
	Don’t cite this document other than as work in progress. </p>
   <p> <a href="https://github.com/w3c/csswg-drafts/issues">GitHub Issues</a> are preferred for discussion of this specification.
	When filing an issue, please put the text “css-page-floats” in the title,
	preferably like this:
	“[css-page-floats] <i data-lt>…summary of comment…</i>”.
	All issues and comments are <a href="https://lists.w3.org/Archives/Public/public-css-archive/">archived</a>,
	and there is also a <a href="https://lists.w3.org/Archives/Public/www-style/">historical archive</a>. </p>
   <p> This document was produced by the <a href="https://www.w3.org/Style/CSS/">CSS Working Group</a>. </p>
   <p> This document was produced by a group operating under
	the <a href="https://www.w3.org/Consortium/Patent-Policy/">W3C Patent Policy</a>.
	W3C maintains a <a href="https://www.w3.org/2004/01/pp-impl/32061/status" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group;
	that page also includes instructions for disclosing a patent.
	An individual who has actual knowledge of a patent which the individual believes contains <a href="https://www.w3.org/Consortium/Patent-Policy/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="https://www.w3.org/Consortium/Patent-Policy/#sec-Disclosure">section 6 of the W3C Patent Policy</a>. </p>
   <p> This document is governed by the <a href="https://www.w3.org/2019/Process-20190301/" id="w3c_process_revision">1 March 2019 W3C Process Document</a>. </p>
   <p></p>
   <p>Some of the features in this draft were previously published in <cite>CSS Generated Content for Paged Media Module</cite> <a data-link-type="biblio" href="#biblio-css3gcpm">[CSS3GCPM]</a>.</p>
  </div>
  <div data-fill-with="at-risk"></div>
  <nav data-fill-with="table-of-contents" id="toc">
   <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
   <ol class="toc" role="directory">
    <li><a href="#overview"><span class="secno">1</span> <span class="content">Overview</span></a>
    <li><a href="#terms"><span class="secno">2</span> <span class="content"> Terminology</span></a>
    <li>
     <a href="#floating"><span class="secno">3</span> <span class="content"> Floating to the inline-start/inline-end and block-start/block-end</span></a>
     <ol class="toc">
      <li><a href="#float-reference-property"><span class="secno">3.1</span> <span class="content">The <span class="property">float-reference</span> property</span></a>
      <li><a href="#float-property"><span class="secno">3.2</span> <span class="content">The <span class="property">float</span> property</span></a>
     </ol>
    <li><a href="#clearing_page_floats"><span class="secno">4</span> <span class="content"> The <span class="property">clear</span> property</span></a>
    <li>
     <a href="#deferring_floats"><span class="secno">5</span> <span class="content">Deferring page floats</span></a>
     <ol class="toc">
      <li><a href="#float-defer-property"><span class="secno">5.1</span> <span class="content">The <span class="property">float-defer</span> property</span></a>
     </ol>
    <li><a href="#wrapping-around-page-floats"><span class="secno">6</span> <span class="content">Wrapping around page floats</span></a>
    <li><a href="#the-float_offset-property"><span class="secno">7</span> <span class="content">The <span class="property">float-offset</span> property</span></a>
    <li>
     <a href="#page-float-placement"><span class="secno">8</span> <span class="content">Page float placement</span></a>
     <ol class="toc">
      <li><a href="#float-reference-growth"><span class="secno">8.1</span> <span class="content">Float reference growth</span></a>
      <li><a href="#float-stacking"><span class="secno">8.2</span> <span class="content">Rules for page float stacking</span></a>
     </ol>
    <li>
     <a href="#relation_to_absolutely_positioned_exclusions"><span class="secno">9</span> <span class="content"> Floats and absolutely positioned exclusions</span></a>
     <ol class="toc">
      <li><a href="#inline_floats_and_absolutely_positioned_exclusions"><span class="secno">9.1</span> <span class="content"> Differences between inline floats and absolutely positioned elements</span></a>
     </ol>
    <li><a href="#overconstrained-page-floats"><span class="secno">10</span> <span class="content">Overconstrained floats</span></a>
    <li><a href="#acks"><span class="secno"></span> <span class="content"> Acknowledgments</span></a>
    <li>
     <a href="#conformance"><span class="secno"></span> <span class="content"> Conformance</span></a>
     <ol class="toc">
      <li><a href="#document-conventions"><span class="secno"></span> <span class="content"> Document conventions</span></a>
      <li><a href="#conform-classes"><span class="secno"></span> <span class="content"> Conformance classes</span></a>
      <li>
       <a href="#conform-responsible"><span class="secno"></span> <span class="content"> Requirements for Responsible Implementation of CSS</span></a>
       <ol class="toc">
        <li><a href="#conform-partial"><span class="secno"></span> <span class="content"> Partial Implementations</span></a>
        <li><a href="#conform-future-proofing"><span class="secno"></span> <span class="content"> Implementations of Unstable and Proprietary Features</span></a>
        <li><a href="#conform-testing"><span class="secno"></span> <span class="content"> Implementations of CR-level Features</span></a>
       </ol>
     </ol>
    <li>
     <a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
     <ol class="toc">
      <li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
      <li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
     </ol>
    <li>
     <a href="#references"><span class="secno"></span> <span class="content">References</span></a>
     <ol class="toc">
      <li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
      <li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
     </ol>
    <li><a href="#property-index"><span class="secno"></span> <span class="content">Property Index</span></a>
    <li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
   </ol>
  </nav>
  <main>
   <h2 class="heading settled" data-level="1" id="overview"><span class="secno">1. </span><span class="content">Overview</span><a class="self-link" href="#overview"></a></h2>
   <p><em>This section is not normative.</em></p>
   <p>This specification adds new keywords on the <a class="property" data-link-type="propdesc" href="#propdef-float" id="ref-for-propdef-float">float</a> property.</p>
   <p>This document allows to specify whether a <a data-link-type="dfn" href="#float" id="ref-for-float">float</a> floats to align with a <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference">float reference</a> inline box, column, region or page. In the case of floats
  with a reference <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-container" id="ref-for-fragmentation-container">fragmentation container</a>, placement can be deferred to a
  subsequent <span id="ref-for-fragmentation-container①">fragmentation container</span> with the <em>float-defer</em> properties.</p>
   <p>New values on the <a class="property" data-link-type="propdesc" href="#propdef-clear" id="ref-for-propdef-clear">clear</a> property add further ways of refining layouts.</p>
   <p>The way contents wrap around floats can be controlled by changing the value of
  the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-exclusions-1/#propdef-wrap-flow" id="ref-for-propdef-wrap-flow">wrap-flow</a> property which initially is set to <a class="property" data-link-type="propdesc">both</a> for page floats.</p>
   <p class="issue" id="issue-f0d0f60c"><a class="self-link" href="#issue-f0d0f60c"></a> Page floats as defined here work with different types of fragmentation types
    (columns, regions, pages) as well as container elements. The specification
    is no longer specific to print or to pages.
    At the same time, inline floats and page floats differ in many ways, and it may
    (or may not) be a good idea to separate the two entirely.
    Therefore, the name <em>CSS Page Floats</em> should probably be replaced with
    a more appropriate name. </p>
   <h2 class="heading settled" data-level="2" id="terms"><span class="secno">2. </span><span class="content"> Terminology</span><a class="self-link" href="#terms"></a></h2>
   <dl>
    <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="float">Float</dfn> 
    <dd> An element which has float set to something else than none. 
    <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="inline-float">Inline float</dfn> 
    <dd> A float which has float set to inline. 
    <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="page-float">Page float</dfn> 
    <dd> A float which has float set to something else than inline or none. 
    <dt><dfn data-dfn-type="dfn" data-export id="float-block-formatting-context">Float block formatting context<a class="self-link" href="#float-block-formatting-context"></a></dfn> 
    <dd> The block formatting context which is generated by a float and which contains
      its contents. 
    <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="float-anchor">Float anchor</dfn> 
    <dd> The float anchor is the point in the flow where the float had appeared had
      it not been a float and instead had been an empty inline element with no
      margins, borders or padding. 
    <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="float-containing-block-formatting-context">Float containing block formatting context</dfn> 
    <dd> The block formatting context inside of which an float is embedded. 
    <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="initial-float-reference">Initial float reference</dfn> 
    <dd> The entity to which the float is aligned initially, before float
        placement takes place. 
    <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="float-reference">Float reference</dfn> 
    <dd> The entity to which the float is aligned. 
    <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="not-overlapping">Not overlapping</dfn> 
    <dd> Two elements are not overlapping if the margin box of one element is not
      overlapping the margin box of the other element. 
   </dl>
   <h2 class="heading settled" data-level="3" id="floating"><span class="secno">3. </span><span class="content"> Floating to the inline-start/inline-end and block-start/block-end</span><a class="self-link" href="#floating"></a></h2>
   <p> Floating elements can float to the start or end of the <a data-link-type="dfn" href="#float-anchor" id="ref-for-float-anchor">float anchor</a>’s line or
    block, specified by the <a class="property" data-link-type="propdesc" href="#propdef-float" id="ref-for-propdef-float①">float</a> attribute. The floats are aligning to the start
    or end of a <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference①">float reference</a>, specified by the <a class="property" data-link-type="propdesc" href="#propdef-float-reference" id="ref-for-propdef-float-reference">float-reference</a> attribute. The <span id="ref-for-float-reference②">float reference</span> can be the <span id="ref-for-float-anchor①">float anchor</span>’s line box, column, region or page. </p>
   <h3 class="heading settled" data-level="3.1" id="float-reference-property"><span class="secno">3.1. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-float-reference" id="ref-for-propdef-float-reference①">float-reference</a> property</span><a class="self-link" href="#float-reference-property"></a></h3>
   <table class="def propdef" data-link-for-hint="float-reference">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-float-reference">float-reference</dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod">inline <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one">|</a> column <span id="ref-for-comb-one①">|</span> region <span id="ref-for-comb-one②">|</span> page 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>inline 
     <tr>
      <th>Applies to:
      <td>all elements. 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no 
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>N/A 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>specified keyword 
     <tr>
      <th>Canonical order:
      <td>per grammar 
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>discrete 
   </table>
   <dl>
    <dt><dfn class="css" data-dfn-for="float-reference" data-dfn-type="value" data-export id="valdef-float-reference-inline">inline<a class="self-link" href="#valdef-float-reference-inline"></a></dfn> 
    <dd>
      The <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference③">float reference</a> is the line box of the <a data-link-type="dfn" href="#float-anchor" id="ref-for-float-anchor②">float anchor</a>. 
     <p>The <a data-link-type="dfn" href="#float-containing-block-formatting-context" id="ref-for-float-containing-block-formatting-context">float containing block formatting context</a> is the same as that of the <a data-link-type="dfn" href="#float-anchor" id="ref-for-float-anchor③">float anchor</a>.</p>
     <p>The float is an <a data-link-type="dfn" href="#inline-float" id="ref-for-inline-float">inline float</a>.</p>
    <dt><dfn class="css" data-dfn-for="float-reference" data-dfn-type="value" data-export id="valdef-float-reference-column">column<a class="self-link" href="#valdef-float-reference-column"></a></dfn> 
    <dd>
      The <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference④">float reference</a> is the column in a multi column environment in
      which the <a data-link-type="dfn" href="#float-anchor" id="ref-for-float-anchor④">float anchor</a> is placed. If the <span id="ref-for-float-anchor⑤">float anchor</span> is not
      inside a column, the <span id="ref-for-float-reference⑤">float reference</span> is the line box of the <span id="ref-for-float-anchor⑥">float
      anchor</span>. 
     <p>The <a data-link-type="dfn" href="#float-containing-block-formatting-context" id="ref-for-float-containing-block-formatting-context①">float containing block formatting context</a> is a new block formatting
      context with the same dimensions and placement as the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference⑥">float reference</a>.</p>
     <p>The float is a <a data-link-type="dfn" href="#page-float" id="ref-for-page-float">page float</a>.</p>
    <dt><dfn class="css" data-dfn-for="float-reference" data-dfn-type="value" data-export id="valdef-float-reference-region">region<a class="self-link" href="#valdef-float-reference-region"></a></dfn> 
    <dd>
      The <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference⑦">float reference</a> is the region in a region-chain within which the <a data-link-type="dfn" href="#float-anchor" id="ref-for-float-anchor⑦">float anchor</a> is placed. If the <span id="ref-for-float-anchor⑧">float anchor</span> is not inside a
      region, the <span id="ref-for-float-reference⑧">float reference</span> is the line box of the <span id="ref-for-float-anchor⑨">float
      anchor</span>. 
     <p>The <a data-link-type="dfn" href="#float-containing-block-formatting-context" id="ref-for-float-containing-block-formatting-context②">float containing block formatting context</a> is a new block formatting
      context with the same dimensions and placement as the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference⑨">float reference</a>.</p>
     <p>The float is a <a data-link-type="dfn" href="#page-float" id="ref-for-page-float①">page float</a>.</p>
    <dt><dfn class="css" data-dfn-for="float-reference" data-dfn-type="value" data-export id="valdef-float-reference-page">page<a class="self-link" href="#valdef-float-reference-page"></a></dfn> 
    <dd>
      The <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference①⓪">float reference</a> of the float is the page within which the <a data-link-type="dfn" href="#float-anchor" id="ref-for-float-anchor①⓪">float
      anchor</a> is placed. If the <span id="ref-for-float-anchor①①">float anchor</span> is not inside a page, the <span id="ref-for-float-reference①①">float reference</span> is the line box of the <span id="ref-for-float-anchor①②">float anchor</span>. 
     <p>The <a data-link-type="dfn" href="#float-containing-block-formatting-context" id="ref-for-float-containing-block-formatting-context③">float containing block formatting context</a> is a new block formatting
      context with the same dimensions and placement as the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference①②">float reference</a>.</p>
     <p>The float is a <a data-link-type="dfn" href="#page-float" id="ref-for-page-float②">page float</a>.</p>
   </dl>
   <div class="issue" id="issue-08bce5eb"><a class="self-link" href="#issue-08bce5eb"></a> The <a data-link-type="dfn" href="#float-containing-block-formatting-context" id="ref-for-float-containing-block-formatting-context④">float containing block formatting context</a> having the same dimensions
    as the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference①③">float reference</a> means that all floats that are not inline floats
    cannot move outside of their float references. Is this wanted? </div>
   <div class="issue" id="issue-f5d44217">
    <a class="self-link" href="#issue-f5d44217"></a> It is not possible to specify a block element which element to use as the
    reference element. This has been requested. 
    <p>Maybe something like:</p>
<pre><code>&lt;style>
.float {
float-reference: float-container;
}

#container {
float-container: true;
}
&lt;/style>

&lt;div id="container">
&lt;p>First paragraph&lt;span class="float">FLOAT&lt;/span>&lt;/p>

&lt;p>Second paragraph
&lt;span class="inline-block">[&lt;span class="float">FLOAT&lt;/span>] &lt;/span>
And some more text&lt;/p>
&lt;/div>
</code></pre>
    <p>This should float both floats with reference to the &lt;div id="container">
    element, rather than the &lt;P> and inline &lt;SPAN> elements.</p>
   </div>
   <h3 class="heading settled" data-level="3.2" id="float-property"><span class="secno">3.2. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-float" id="ref-for-propdef-float②">float</a> property</span><a class="self-link" href="#float-property"></a></h3>
   <table class="def propdef" data-link-for-hint="float">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-float">float</dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod">block-start <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one③">|</a> block-end <span id="ref-for-comb-one④">|</span> inline-start <span id="ref-for-comb-one⑤">|</span> inline-end <span id="ref-for-comb-one⑥">|</span> snap-block <span id="ref-for-comb-one⑦">|</span> <a class="production css" data-link-type="function" href="#funcdef-float-snap-block" id="ref-for-funcdef-float-snap-block">&lt;snap-block()></a> <span id="ref-for-comb-one⑧">|</span> snap-inline <span id="ref-for-comb-one⑨">|</span> <a class="production css" data-link-type="function" href="#funcdef-float-snap-inline" id="ref-for-funcdef-float-snap-inline">&lt;snap-inline()></a> <span id="ref-for-comb-one①⓪">|</span> left <span id="ref-for-comb-one①①">|</span> right <span id="ref-for-comb-one①②">|</span> top <span id="ref-for-comb-one①③">|</span> bottom <span id="ref-for-comb-one①④">|</span> none
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>none
     <tr>
      <th>Applies to:
      <td>all elements.
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>N/A
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>as specified
     <tr>
      <th>Canonical order:
      <td>per grammar
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>by computed value type
   </table>
   <dl>
    <dt><dfn class="css" data-dfn-for="float" data-dfn-type="value" data-export id="valdef-float-inline-start">inline-start<a class="self-link" href="#valdef-float-inline-start"></a></dfn> 
    <dd>
      If the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference①④">float reference</a> is a line box, the element generates a box that
    is floated to the line-start outer edge of the <span id="ref-for-float-reference①⑤">float reference</span> and
    content flows on the line-end side of the box. 
     <p>If the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference①⑥">float reference</a> is not a line box, the element generates a box
    that is floated to the line-start and block-start outer edges of the <span id="ref-for-float-reference①⑦">float
    reference</span>.</p>
    <dt><dfn class="css" data-dfn-for="float" data-dfn-type="value" data-export id="valdef-float-inline-end">inline-end<a class="self-link" href="#valdef-float-inline-end"></a></dfn> 
    <dd>
      If the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference①⑧">float reference</a> is a line box, the element generates a box that
    is floated to the line-ebd  outer edge of the <span id="ref-for-float-reference①⑨">float reference</span> and
    content flows on the line-start side of the box. 
     <p>If the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference②⓪">float reference</a> is not a line box, the element generates a box
    that is floated to the line-end and block-end outer edges of the <span id="ref-for-float-reference②①">float
    reference</span>.</p>
    <dt><dfn class="css" data-dfn-for="float" data-dfn-type="value" data-export id="valdef-float-block-start">block-start<a class="self-link" href="#valdef-float-block-start"></a></dfn> 
    <dd>
      If the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference②②">float reference</a> is a line box, block-start behaves like
    inline-start. 
     <p>If the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference②③">float reference</a> is not a line box, the element generates a box
    that is floated to the block-start and line-start outer edges of the <span id="ref-for-float-reference②④">float
    reference</span>.</p>
     <p>The initial value of the <a data-link-type="dfn">max-width</a> or <span>max-height</span> property that
    refers to the <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#inline-size" id="ref-for-inline-size">inline size</a> of the float is '100%'.</p>
     <p>Content flows on the block-end side of the box.</p>
    <dt><dfn class="css" data-dfn-for="float" data-dfn-type="value" data-export id="valdef-float-block-end">block-end<a class="self-link" href="#valdef-float-block-end"></a></dfn> 
    <dd>
      If the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference②⑤">float reference</a> is a line box, block-end behaves like inline-end. 
     <p>If the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference②⑥">float reference</a> is not a line box, the element generates a box
    that is floated to the block-end and line-end outer edges of the <span id="ref-for-float-reference②⑦">float
    reference</span>.</p>
     <p>The initial value of the <a data-link-type="dfn">max-width</a> or <span>max-height</span> property that
    refers to the <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#inline-size" id="ref-for-inline-size①">inline size</a> of the float is '100%'.</p>
     <p>Content flows on the block-start side of the box.</p>
    <dt><dfn class="css" data-dfn-for="float" data-dfn-type="value" data-export id="valdef-float-left">left<a class="self-link" href="#valdef-float-left"></a></dfn> 
    <dd>
      If the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference②⑧">float reference</a> is a line box, behaves like inline-start or
    inline-end, whichever corresponds to line-left for the float reference. 
     <p>Otherwise, behaves like block-end, inline-start or inline-end depending on
    the float containing block’s <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-direction" id="ref-for-propdef-direction">direction</a> and <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-writing-modes-4/#propdef-writing-mode" id="ref-for-propdef-writing-mode">writing-mode</a>.</p>
    <dt><dfn class="css" data-dfn-for="float" data-dfn-type="value" data-export id="valdef-float-right">right<a class="self-link" href="#valdef-float-right"></a></dfn> 
    <dd>
      If the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference②⑨">float reference</a> is a line box, behaves like inline-start or
    inline-end, whichever corresponds to line-right for the float reference. 
     <p>Otherwise, behaves like block-start, inline-start or inline-end depending on
    the float containing block’s <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-direction" id="ref-for-propdef-direction①">direction</a> and <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-writing-modes-4/#propdef-writing-mode" id="ref-for-propdef-writing-mode①">writing-mode</a>.</p>
    <dt><dfn class="css" data-dfn-for="float" data-dfn-type="value" data-export id="valdef-float-top">top<a class="self-link" href="#valdef-float-top"></a></dfn> 
    <dd> Behave like block-start or inline-start depending on the float
    containing block’s <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-direction" id="ref-for-propdef-direction②">direction</a> and <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-writing-modes-4/#propdef-writing-mode" id="ref-for-propdef-writing-mode②">writing-mode</a>. 
    <dt><dfn class="css" data-dfn-for="float" data-dfn-type="value" data-export id="valdef-float-bottom">bottom<a class="self-link" href="#valdef-float-bottom"></a></dfn> 
    <dd> Behave like block-end or inline-end depending on the float
    containing block’s <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-direction" id="ref-for-propdef-direction③">direction</a> and <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-writing-modes-4/#propdef-writing-mode" id="ref-for-propdef-writing-mode③">writing-mode</a>. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="float" data-dfn-type="function" data-export id="funcdef-float-snap-block">snap-block()</dfn> 
    <dd>
      The <a class="css" data-link-type="maybe" href="#funcdef-float-snap-block" id="ref-for-funcdef-float-snap-block①">snap-block()</a> function is defined as: 
<pre class="prod">snap-block() = snap-block( <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#length-value" id="ref-for-length-value" title="Expands to: em | vb | ch | cm | vh | vi | in | ex | vw | ic | pt | px | lh | pc | rem | rlh | vmax | advance measure | vmin | mm | cap | q">&lt;length></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-comma" id="ref-for-comb-comma">,</a> [ start <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⑤">|</a> end <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⑥">|</a> near ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt">?</a> )
</pre>
     <p>Has no effect if the element is an <a data-link-type="dfn" href="#inline-float" id="ref-for-inline-float①">inline float</a>.</p>
     <p>If the element is a <a data-link-type="dfn" href="#page-float" id="ref-for-page-float③">page float</a>, it makes the element float to the
      start or the end of the block if it naturally appears within a certain
      distance from either one. The length value(s) specifies the maximum
      distance from the start/end that an element must be within in order to be
      floated; one length value specifies the distance from both the start and
      the end, two length values specify the distance from the start and end,
      respectively.</p>
     <p>The optional keyword value specifies where the element is floated: start,
      end, or the nearest of the two. The initial value is <a class="property" data-link-type="propdesc">near</a>. If <span class="property">near</span> is in effect and the element is within the specified distance both from
      the start and the end, end wins.</p>
    <dt><dfn class="css" data-dfn-for="float" data-dfn-type="value" data-export id="valdef-float-snap-block">snap-block<a class="self-link" href="#valdef-float-snap-block"></a></dfn> 
    <dd>Behaves as <code>snap-block(2em, near)</code> 
    <dt><dfn class="dfn-paneled css" data-dfn-for="float" data-dfn-type="function" data-export id="funcdef-float-snap-inline">snap-inline()</dfn> 
    <dd>
      The <a class="css" data-link-type="maybe" href="#funcdef-float-snap-inline" id="ref-for-funcdef-float-snap-inline①">snap-inline()</a> function is defined as: 
<pre class="prod">snap-inline() = snap-inline( <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#length-value" id="ref-for-length-value①" title="Expands to: em | vb | ch | cm | vh | vi | in | ex | vw | ic | pt | px | lh | pc | rem | rlh | vmax | advance measure | vmin | mm | cap | q">&lt;length></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-comma" id="ref-for-comb-comma①">,</a> [ left <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⑦">|</a> right <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⑧">|</a> near ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt①">?</a> )
</pre>
     <p>Has no effect if the element is an <a data-link-type="dfn" href="#inline-float" id="ref-for-inline-float②">inline float</a>.</p>
     <p>If the element is a <a data-link-type="dfn" href="#page-float" id="ref-for-page-float④">page float</a>, it makes the element float to the
      line start or line end if it naturally appears within a certain distance
      from the start or end of the line. The length value(s) specifies the
      maximum distance from the start/end that an element must be within in
      order to be floated; one length value specifies the distance from both the
      start and the end, two length values specify the distance from the start
      and end, respectively.</p>
     <p>The optional keyword value specifies where the element is floated: line
      start, line end, or the nearest of the two. The initial value is <a class="property" data-link-type="propdesc">near</a>.
      If <span class="property">near</span> is in effect and the element is within the specified distance
      both from the start and the end, end wins.</p>
    <dt><dfn class="css" data-dfn-for="float" data-dfn-type="value" data-export id="valdef-float-snap-inline">snap-inline<a class="self-link" href="#valdef-float-snap-inline"></a></dfn> 
    <dd>same as <code>snap-inline(2em, near)</code> 
    <dt><dfn class="css" data-dfn-for="float" data-dfn-type="value" data-export id="valdef-float-none">none<a class="self-link" href="#valdef-float-none"></a></dfn> 
    <dd>The box is not floated. 
   </dl>
   <div class="issue" id="issue-fc8e173d"><a class="self-link" href="#issue-fc8e173d"></a> There is currently no way to float into a combination of directions (top right,
  right top, left bottom, bottom left, etc.). </div>
   <div class="example" id="example-57303dbe">
    <a class="self-link" href="#example-57303dbe"></a> Float figure to top of reference column: 
<pre>.figure { float-reference: column; float: top }
</pre>
    <p><img alt="sample rendering" src="images/7.png"></p>
   </div>
   <div class="example" id="example-a4310bcb">
    <a class="self-link" href="#example-a4310bcb"></a> In this example a block-start float that does not fill the entire <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#inline-size" id="ref-for-inline-size②">inline size</a> of the float reference is placed at the start of the block and line. 
<pre>.figure { float-reference: column; float: block-start; width: 50% }
</pre>
    <p><img alt="sample rendering" src="images/block_line_start.png"></p>
   </div>
   <div class="example" id="example-3b9c038b">
    <a class="self-link" href="#example-3b9c038b"></a> In this example, a figure naturally appears close to a column break. There is
  not enough space for the figure in the first column, and it is therefore placed
  in the second column, leaving white space at the bottom of the first column. 
    <p><img alt="sample rendering" src="images/23.png"></p>
    <p>To avoid the white space, the image can be floated to the nearest edge (in the
  block direction):</p>
<pre>.figure { float-reference: column; float: snap-block }
</pre>
    <p>In this example, the figure is already at the nearest edge, so it does not
  move. However, floats allow subsequent content to be displayed before the
  float and the white space can therefore be filled:</p>
    <p><img alt="sample rendering" src="images/7.png"></p>
   </div>
   <div class="example" id="example-a00920d6">
    <a class="self-link" href="#example-a00920d6"></a> 
    <p>In this example, two figures naturally appear in the text flow:</p>
    <p><img alt="sample rendering" src="images/20.png"></p>
    <p>A typographer would typically try to avoid single lines of text above/below
  figures, which can be achieved with:</p>
<pre>div.figure { float-reference: column; float: snap-block(1.5em) }
</pre>
    <p>The length value specifies the reach of the snap function; in this example the
  second figure is affected, but not the first.</p>
   </div>
   <div class="example" id="example-8da0b3d8">
    <a class="self-link" href="#example-8da0b3d8"></a> 
    <p>In this example, two figures naturally appear in the text flow:</p>
    <p><img alt="sample rendering" src="images/20.png"></p>
    <p>To make the figures snap to the nearest edges, this code can be applied:</p>
<pre>div.figure { float-reference: column; float: snap-block(2.5em) }
</pre>
    <p>The resultant rendering is:</p>
    <p><img alt="sample rendering" src="images/22.png"></p>
   </div>
   <div class="example" id="example-18f08fd9">
    <a class="self-link" href="#example-18f08fd9"></a> In this example, tables will snap to the top/bottom if the top/bottom of the
  border box is closer than <a class="property" data-link-type="propdesc">3em</a> from the top/bottom of the float-reference
  which is a block element. 
<pre>table { float: snap }
table { float: snap-block(3em) }
table { float: snap-block(3em, bottom) }
table { float: snap-block(3em 2em, bottom) }
</pre>
   </div>
   <div class="note" role="note"> More examples with regions as <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference③⓪">float reference</a>s needed. </div>
   <h2 class="heading settled" data-level="4" id="clearing_page_floats"><span class="secno">4. </span><span class="content"> The <a class="property" data-link-type="propdesc" href="#propdef-clear" id="ref-for-propdef-clear①">clear</a> property</span><a class="self-link" href="#clearing_page_floats"></a></h2>
   <table class="def propdef" data-link-for-hint="clear">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-clear">clear</dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod">inline-start <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⑨">|</a> inline-end <span id="ref-for-comb-one②⓪">|</span> block-start <span id="ref-for-comb-one②①">|</span> block-end <span id="ref-for-comb-one②②">|</span> left <span id="ref-for-comb-one②③">|</span> right <span id="ref-for-comb-one②④">|</span> top <span id="ref-for-comb-one②⑤">|</span> bottom <span id="ref-for-comb-one②⑥">|</span> none 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>none 
     <tr>
      <th>Applies to:
      <td>block-level elements, floats, regions, pages 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no 
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>N/A 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>specified keyword 
     <tr>
      <th>Canonical order:
      <td>per grammar 
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>discrete 
   </table>
   <p>To prevent stacking of floats, the <a class="property" data-link-type="propdesc" href="#propdef-clear" id="ref-for-propdef-clear②">clear</a> property can be used:</p>
   <dl>
    <dt><dfn class="css" data-dfn-for="clear" data-dfn-type="value" data-export id="valdef-clear-inline-start">inline-start<a class="self-link" href="#valdef-clear-inline-start"></a></dfn> 
    <dd>
      If applied to an inline float, requires that the block-start outer edge of
      the box comes after the block-end outer edge of any inline-start-floats
      with an inline-start-float-reference that resulted from elements earlier
      in the source document. 
     <p>If applied to a <a data-link-type="dfn" href="#page-float" id="ref-for-page-float⑤">page float</a>, the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference③①">float reference</a> in which the
      page float is placed will be seen as full when determining whether it can
      host subsequent page floats that float in the inline-start direction.</p>
    <dt><dfn class="css" data-dfn-for="clear" data-dfn-type="value" data-export id="valdef-clear-inline-end">inline-end<a class="self-link" href="#valdef-clear-inline-end"></a></dfn> 
    <dd>
      If applied to a block-level element or an <a data-link-type="dfn" href="#inline-float" id="ref-for-inline-float③">inline float</a>, requires
      that the block-start outer edge of the box comes after the block-end outer
      edge of any inline-end-floats with an inline-end-float-reference that
      resulted from elements earlier in the source document. 
     <p>If applied to a <a data-link-type="dfn" href="#page-float" id="ref-for-page-float⑥">page float</a>, the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference③②">float reference</a> in which the
      page float is placed will be seen as full when determining whether it can
      host subsequent page floats that float in the inline-end direction.</p>
    <dt><dfn class="css" data-dfn-for="clear" data-dfn-type="value" data-export id="valdef-clear-block-start">block-start<a class="self-link" href="#valdef-clear-block-start"></a></dfn> 
    <dd>
      If applied to a block-level element or an <a data-link-type="dfn" href="#inline-float" id="ref-for-inline-float④">inline float</a>, behaves like
      inline-start. 
     <p>If applied to a page float, the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference③③">float reference</a> in which the page
      float is placed will be seen as full when determining whether it can host
      subsequent page floats that float in the block-start direction.</p>
    <dt><dfn class="css" data-dfn-for="clear" data-dfn-type="value" data-export id="valdef-clear-block-end">block-end<a class="self-link" href="#valdef-clear-block-end"></a></dfn> 
    <dd>
      If applied to a block-level element or an <a data-link-type="dfn" href="#inline-float" id="ref-for-inline-float⑤">inline float</a>, behaves
      like inline-end. 
     <p>If applied to a page float, the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference③④">float reference</a> in which the page float
      is placed will be seen as full when determining whether it can host
      subsequent page floats that float in the block-end direction.</p>
    <dt><dfn class="css" data-dfn-for="clear" data-dfn-type="value" data-export id="valdef-clear-left">left<a class="self-link" href="#valdef-clear-left"></a></dfn> 
    <dd> Behave like block-end, inline-start or inline-end depending on the float
      containing block’s <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-direction" id="ref-for-propdef-direction④">direction</a> and <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-writing-modes-4/#propdef-writing-mode" id="ref-for-propdef-writing-mode④">writing-mode</a>. 
    <dt><dfn class="css" data-dfn-for="clear" data-dfn-type="value" data-export id="valdef-clear-right">right<a class="self-link" href="#valdef-clear-right"></a></dfn> 
    <dd> Behave like block-start, inline-start or inline-end depending on the float
      containing block’s <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-direction" id="ref-for-propdef-direction⑤">direction</a> and <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-writing-modes-4/#propdef-writing-mode" id="ref-for-propdef-writing-mode⑤">writing-mode</a>. 
    <dt><dfn class="css" data-dfn-for="clear" data-dfn-type="value" data-export id="valdef-clear-top">top<a class="self-link" href="#valdef-clear-top"></a></dfn> 
    <dd> Behave like block-start or inline-start depending on the float
      containing block’s <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-direction" id="ref-for-propdef-direction⑥">direction</a> and <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-writing-modes-4/#propdef-writing-mode" id="ref-for-propdef-writing-mode⑥">writing-mode</a>. 
    <dt><dfn class="css" data-dfn-for="clear" data-dfn-type="value" data-export id="valdef-clear-bottom">bottom<a class="self-link" href="#valdef-clear-bottom"></a></dfn> 
    <dd> Behave like block-end or inline-end depending on the float
      containing block’s <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-direction" id="ref-for-propdef-direction⑦">direction</a> and <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-writing-modes-4/#propdef-writing-mode" id="ref-for-propdef-writing-mode⑦">writing-mode</a>. 
    <dt><dfn class="css" data-dfn-for="clear" data-dfn-type="value" data-export id="valdef-clear-both-inline">both-inline<a class="self-link" href="#valdef-clear-both-inline"></a></dfn> 
    <dd> Behave like inline-start and inline-end. 
    <dt><dfn class="css" data-dfn-for="clear" data-dfn-type="value" data-export id="valdef-clear-both-block">both-block<a class="self-link" href="#valdef-clear-both-block"></a></dfn> 
    <dd> Behave like block-start and block-end. 
    <dt><dfn class="css" data-dfn-for="clear" data-dfn-type="value" data-export id="valdef-clear-both">both<a class="self-link" href="#valdef-clear-both"></a></dfn> 
    <dd> Behave like both-inline. 
    <dt><dfn class="css" data-dfn-for="clear" data-dfn-type="value" data-export id="valdef-clear-all">all<a class="self-link" href="#valdef-clear-all"></a></dfn> 
    <dd> Behave like both-block and both-inline. 
   </dl>
   <div class="example" id="example-79002a2c">
    <a class="self-link" href="#example-79002a2c"></a> In this example, the two figures may appear in the same column: 
<pre>.figure { float-reference: column; float: bottom; clear: none }

&lt;div class=figure>&lt;/div>
&lt;div class=figure>&lt;/div>
</pre>
    <p><img alt="sample rendering" src="images/16.png"></p>
   </div>
   <div class="example" id="example-27321d7c">
    <a class="self-link" href="#example-27321d7c"></a> In this example, the two figures will appear in different columns: 
<pre>.figure { float-reference: column; float: bottom; clear: bottom }

&lt;div class=figure>&lt;/div>
&lt;div class=figure>&lt;/div>
</pre>
    <p><img alt="sample rendering" src="images/17.png"></p>
   </div>
   <div class="example" id="example-c48b5f18">
    <a class="self-link" href="#example-c48b5f18"></a> In this example, the two figures may appear at the bottom of the same column
    due to clearing only at the top: 
<pre>.figure { float-reference: column; float: bottom; clear: top }

&lt;div class=figure>&lt;/div>
&lt;div class=figure>&lt;/div>
</pre>
    <p><img alt="sample rendering" src="images/16.png"></p>
   </div>
   <div class="example" id="example-33e247dc">
    <a class="self-link" href="#example-33e247dc"></a> In this example, the two figures will appear in different columns due to
    clearing at the bottom: 
<pre>.figure { float-reference: column; float: bottom; clear: bottom }

&lt;div class=figure>&lt;/div>
&lt;div class=figure>&lt;/div>
</pre>
    <p><img alt="sample rendering" src="images/17.png"></p>
   </div>
   <div class="example" id="example-17226e58">
    <a class="self-link" href="#example-17226e58"></a> In this example, the two figures end up the top corner of two different
    pages: 
<pre>.figure { float-reference: page; float: top; clear: top }

&lt;div class=figure>&lt;/div>
&lt;div class=figure>&lt;/div>
</pre>
   </div>
   <div class="example" id="example-16b550af">
    <a class="self-link" href="#example-16b550af"></a> In this example, the two figures request different positions, and they may
    therefore end up in the same column: 
<pre>.figure.one { float-reference: column; float: top; clear: top }
.figure.two { float-reference: column; float: bottom; clear: bottom }

&lt;div class="figure one">&lt;/div>
&lt;div class="figure two">&lt;/div>
</pre>
   </div>
   <h2 class="heading settled" data-level="5" id="deferring_floats"><span class="secno">5. </span><span class="content">Deferring page floats</span><a class="self-link" href="#deferring_floats"></a></h2>
   <p>Users can influence the placement of a <a data-link-type="dfn" href="#page-float" id="ref-for-page-float⑦">page float</a> by deferring them to
  another <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-container" id="ref-for-fragmentation-container②">fragmentation container</a> than where the <a data-link-type="dfn" href="#float-anchor" id="ref-for-float-anchor①③">float anchor</a> is
  placed.</p>
   <p>A float that is an <a data-link-type="dfn" href="#inline-float" id="ref-for-inline-float⑥">inline float</a> cannot be deferred.</p>
   <p>Float deferring assigns an <a data-link-type="dfn" href="#initial-float-reference" id="ref-for-initial-float-reference">initial float reference</a>, yet float stacking
  can lead page floats being moved to a subsequent <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-container" id="ref-for-fragmentation-container③">fragmentation container</a> if their <span id="ref-for-initial-float-reference①">initial float reference</span> lacks the space to host them.</p>
   <p>The <a class="property" data-link-type="propdesc" href="#propdef-float-defer" id="ref-for-propdef-float-defer">float-defer</a> property is introduced to control deferring floats:</p>
   <h3 class="heading settled" data-level="5.1" id="float-defer-property"><span class="secno">5.1. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-float-defer" id="ref-for-propdef-float-defer①">float-defer</a> property</span><a class="self-link" href="#float-defer-property"></a></h3>
   <table class="def propdef" data-link-for-hint="float-defer">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-float-defer">float-defer</dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod">&lt;integer> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one②⑦">|</a> last <span id="ref-for-comb-one②⑧">|</span> none 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>none 
     <tr>
      <th>Applies to:
      <td>floats 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no 
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>N/A 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>specified keyword or integer 
     <tr>
      <th>Canonical order:
      <td>per grammar 
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>discrete 
   </table>
   <p>This property specifies whether the <a data-link-type="dfn" href="#initial-float-reference" id="ref-for-initial-float-reference②">initial float reference</a> of a <a data-link-type="dfn" href="#page-float" id="ref-for-page-float⑧">page
    float</a> is the <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-container" id="ref-for-fragmentation-container④">fragmentation container</a> in which the <a data-link-type="dfn" href="#float-anchor" id="ref-for-float-anchor①④">float anchor</a> is placed after previous page floats have been placed, or in another one.</p>
   <p>This property is ignored if the element is an <a data-link-type="dfn" href="#inline-float" id="ref-for-inline-float⑦">inline float</a>.</p>
   <p>Values are:</p>
   <dl>
    <dt>none 
    <dd>The <a data-link-type="dfn" href="#initial-float-reference" id="ref-for-initial-float-reference③">initial float reference</a> is the <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-container" id="ref-for-fragmentation-container⑤">fragmentation container</a> in which the <a data-link-type="dfn" href="#float-anchor" id="ref-for-float-anchor①⑤">float anchor</a> is placed after all previous page floats have been placed. 
    <dt>&lt;integer> 
    <dd>
      A positive integer value indicates that the <a data-link-type="dfn" href="#initial-float-reference" id="ref-for-initial-float-reference④">initial float reference</a> of
        the page float should be Nth <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-container" id="ref-for-fragmentation-container⑥">fragmentation container</a> of the `fragmentation
        flow`, where N is the value of the `float-defer` property plus the order
        number of the <span id="ref-for-fragmentation-container⑦">fragmentation container</span> in which the <a data-link-type="dfn" href="#float-anchor" id="ref-for-float-anchor①⑥">float anchor</a> is placed
        after all previous page floats have been placed within the given <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-context" id="ref-for-fragmentation-context">fragmentation context</a>. If N is larger than the order number of the last <span id="ref-for-fragmentation-container⑧">fragmentation container</span> within the given <span id="ref-for-fragmentation-context①">fragmentation context</span> at the time of
        assignment, then N is the order number of the last <span id="ref-for-fragmentation-container⑨">fragmentation container</span> within the given <span id="ref-for-fragmentation-context②">fragmentation context</span>. 
     <p>A negative integer value indicates that the <a data-link-type="dfn" href="#initial-float-reference" id="ref-for-initial-float-reference⑤">initial float reference</a> of
        the page float should be a <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-container" id="ref-for-fragmentation-container①⓪">fragmentation container</a> of the <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-context" id="ref-for-fragmentation-context③">fragmentation context</a>, counting backward from the end, so that -1
        is the last <span id="ref-for-fragmentation-container①①">fragmentation container</span>, -2 is the next-to-last, etc. .
        In the case of a negative integer value, the <span id="ref-for-initial-float-reference⑥">initial float reference</span> is the
        Nth <span id="ref-for-fragmentation-container①②">fragmentation container</span> of the <span id="ref-for-fragmentation-context④">fragmentation context</span>, where N is 1
        plus the order number of the last <span id="ref-for-fragmentation-container①③">fragmentation container</span> within the given <span id="ref-for-fragmentation-context⑤">fragmentation context</span> after all previous page floats have been placed plus
        the value of the `float-defer` property.</p>
     <p>Zero is the same as `none`.</p>
     <p>If the value of the `float-defer` property would cause the <a data-link-type="dfn" href="#initial-float-reference" id="ref-for-initial-float-reference⑦">initial float
        reference</a> to be an inexistent <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-container" id="ref-for-fragmentation-container①④">fragmentation container</a>, the property
        is interpreted as if it were zero.</p>
     <p class="note" role="note"> Negative float-defer values put the initial float reference a certain number
          to be a certain amount of fragmentation containers from the last fragmentation
          container at the time of of the placement. Subsequent page float stacking
          can mean that a page float is being placed in a later fragmentation container
          (a page float with float-defer set to -3 can end up being placed in the
          last fragmentation container), and later page floats may mean that new
          fragmentation containers are added, so that the a fragmentation container
          that previously was Nth last fragmentation container within a fragmentation
          context now is the N+Xth last. Additional fragmentation container(s) that
          are added after the page float was placed, will not cause the page float
          to be moved. </p>
    <dt>last 
    <dd> The <a data-link-type="dfn" href="#initial-float-reference" id="ref-for-initial-float-reference⑧">initial float reference</a> is the last <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-container" id="ref-for-fragmentation-container①⑤">fragmentation container</a> within
        the given <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-context" id="ref-for-fragmentation-context⑥">fragmentation context</a> after all previous page floats have been
        placed. 
   </dl>
   <div class="example" id="example-0df119df">
    <a class="self-link" href="#example-0df119df"></a> Float figure to the top of the region that follows the region in which
      the <a data-link-type="dfn" href="#float-anchor" id="ref-for-float-anchor①⑦">float anchor</a> is placed: 
<pre>.figure { float-reference: region }
.figure { float: top }
.figure { float-defer: 1 }
</pre>
   </div>
   <div class="example" id="example-59a3e2bb">
    <a class="self-link" href="#example-59a3e2bb"></a> Float figure to the top of the next-to-last column: 
<pre>.figure { float-reference: column; float: top; float-defer: -2 }
</pre>
    <p><img alt="sample rendering" src="images/7.png"></p>
   </div>
   <div class="example" id="example-6d752e53">
    <a class="self-link" href="#example-6d752e53"></a> Float figure to the top of the last page: 
<pre>.figure { float-reference: page }
.figure { float: top }
.figure { float-defer: -1 }
</pre>
   </div>
   <div class="example" id="example-448b1f4f">
    <a class="self-link" href="#example-448b1f4f"></a> Float figure to the top of the last column: 
<pre>.figure { float-reference: column }
.figure { float: top }
.figure { float-defer: last }
</pre>
   </div>
   <div class="example" id="example-ad269d3e">
    <a class="self-link" href="#example-ad269d3e"></a> Float figure to top of the last column: 
<pre>.figure { float-reference: column; float: top; float-defer: last }
</pre>
    <p><img alt="sample rendering" src="images/6.png"></p>
   </div>
   <h2 class="heading settled" data-level="6" id="wrapping-around-page-floats"><span class="secno">6. </span><span class="content">Wrapping around page floats</span><a class="self-link" href="#wrapping-around-page-floats"></a></h2>
   <p>Page floats have their <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-exclusions-1/#propdef-wrap-flow" id="ref-for-propdef-wrap-flow①">wrap-flow</a> property set to <a class="property" data-link-type="propdesc">both</a> initially and are
  treated like exclusions. This specification does not make any further
  specification about wrapping contents around page floats.</p>
   <div class="issue" id="issue-3c63489c"><a class="self-link" href="#issue-3c63489c"></a> Should the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-exclusions-1/#propdef-wrap-flow" id="ref-for-propdef-wrap-flow②">wrap-flow</a> really be set to both, or should the flow be restricted
    to only be on one side? </div>
   <h2 class="heading settled" data-level="7" id="the-float_offset-property"><span class="secno">7. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-float-offset" id="ref-for-propdef-float-offset">float-offset</a> property</span><a class="self-link" href="#the-float_offset-property"></a></h2>
   <table class="def propdef" data-link-for-hint="float-offset">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-float-offset">float-offset</dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#length-value" id="ref-for-length-value②" title="Expands to: em | vb | ch | cm | vh | vi | in | ex | vw | ic | pt | px | lh | pc | rem | rlh | vmax | advance measure | vmin | mm | cap | q">&lt;length></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one②⑨">|</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#percentage-value" id="ref-for-percentage-value">&lt;percentage></a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>0 
     <tr>
      <th>Applies to:
      <td>floats 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no 
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>see prose 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>computed <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-length-percentage" id="ref-for-typedef-length-percentage">&lt;length-percentage></a> value 
     <tr>
      <th>Canonical order:
      <td>per grammar 
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>by computed value type 
   </table>
   <p>This property pushes a <a data-link-type="dfn" href="#page-float" id="ref-for-page-float⑨">page float</a> in direction opposite of the where it has been
  floated with <a class="property" data-link-type="propdesc" href="#propdef-float" id="ref-for-propdef-float③">float</a>.</p>
   <p>If the element is an <a data-link-type="dfn" href="#inline-float" id="ref-for-inline-float⑧">inline float</a>, this property is ignored.</p>
   <p>This property can only influence a <a data-link-type="dfn" href="#page-float" id="ref-for-page-float①⓪">page float</a> along an axis along which
  it has been floated.</p>
   <dl>
    <dt><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#percentage-value" id="ref-for-percentage-value①">&lt;percentage></a>
    <dd>
      Percentage values are computed according to this formula: 
<pre>(containing-block-width - float-width) * percentage
(containing-block-height - float-height) * percentage
</pre>
   </dl>
   <div class="example" id="example-eddf978c">
    <a class="self-link" href="#example-eddf978c"></a> 
<pre>img {
  float-reference: column;
  float: left;
  float-offset: 2em;
}
</pre>
    <p>In this example, the image is floated to the left. Therefore, <a class="property" data-link-type="propdesc" href="#propdef-float-offset" id="ref-for-propdef-float-offset①">float-offset</a> may only push the element to the right.</p>
   </div>
   <div class="example" id="example-4f721f7d">
    <a class="self-link" href="#example-4f721f7d"></a> 
<pre>img {
  float-reference: column;
  float: right;
  float-offset: 5px;
}
</pre>
    <p><img alt="sample rendering" src="images/14.png"></p>
   </div>
   <h2 class="heading settled" data-level="8" id="page-float-placement"><span class="secno">8. </span><span class="content">Page float placement</span><a class="self-link" href="#page-float-placement"></a></h2>
   <p>The order of page floats placement is determined by the following rules:</p>
   <ol>
    <li> All page floats with <a class="property" data-link-type="propdesc" href="#propdef-float-reference" id="ref-for-propdef-float-reference②">float-reference</a> set to `page` are placed, in
      document order, before those with <span class="property" id="ref-for-propdef-float-reference③">float-reference</span> set to `region` and
      `column`. 
    <li> Thereafter, page floats with <a class="property" data-link-type="propdesc" href="#propdef-float-reference" id="ref-for-propdef-float-reference④">float-reference</a> set to `column` and `region`
      are placed in document order. 
   </ol>
   <p>The placement of a single page float is a process that has to be terminated
  entirely before the placement of a subsequent page float can be initiated. The
  placement process consists of the following steps:</p>
   <ol>
    <li>Determine the <a data-link-type="dfn" href="#initial-float-reference" id="ref-for-initial-float-reference⑨">initial float reference</a> by considering the <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-container" id="ref-for-fragmentation-container①⑥">fragmentation container</a> in which the <a data-link-type="dfn" href="#float-anchor" id="ref-for-float-anchor①⑧">float anchor</a> is placed and
    the `float-defer` property of the page float. The <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference③⑤">float reference</a> is
    initially set to be the same as the <span id="ref-for-initial-float-reference①⓪">initial float reference</span>.
    <li>Determine if the given <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference③⑥">float reference</a> has enough space or can be
    expanded to host the page float, if the rules of <a href="#float-stacking"> float stacking</a> and <a href="#float-reference-growth">float reference
    growth</a> are to be followed. If this is not the case, and the <span id="ref-for-float-reference③⑦">float
    reference</span> is not the last <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-container" id="ref-for-fragmentation-container①⑦">fragmentation container</a> within the given <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-context" id="ref-for-fragmentation-context⑦">fragmentation context</a>, then make the following <span id="ref-for-fragmentation-container①⑧">fragmentation
    container</span> within the given <span id="ref-for-fragmentation-context⑧">fragmentation context</span> the <span id="ref-for-float-reference③⑧">float
    reference</span>. Repeat this step until the <span id="ref-for-float-reference③⑨">float reference</span> can be
    expanded enough to host the page float or it is the last <span id="ref-for-fragmentation-container①⑨">fragmentation
    container</span> within the given <span id="ref-for-fragmentation-context⑨">fragmentation context</span>.
    <li>If the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference④⓪">float reference</a> is the last <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-container" id="ref-for-fragmentation-container②⓪">fragmentation container</a> within
    the given <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-context" id="ref-for-fragmentation-context①⓪">fragmentation context</a>, and it has not enough space and cannot be
    expanded to host the page float, then do the following:
    <ol>
     <li>If the <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-context" id="ref-for-fragmentation-context①①">fragmentation context</a> allows for the addition of another <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-container" id="ref-for-fragmentation-container②①">fragmentation container</a> and an additional <span id="ref-for-fragmentation-container②②">fragmentation container</span> would have the needed size to host the page float, a new <span id="ref-for-fragmentation-container②③">fragmentation
      container</span> is added to the end of the <span id="ref-for-fragmentation-context①②">fragmentation context</span>. The <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference④①">float reference</a> is set the newly created <span id="ref-for-fragmentation-container②④">fragmentation
      container</span>.
     <li>Otherwise, if the <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-container" id="ref-for-fragmentation-container②⑤">fragmentation container</a> is a region, then the
      'regionOverset` attribute of the <span id="ref-for-fragmentation-container②⑥">fragmentation container</span> is set to
      `overset`. 
    </ol>
    <li>The page float is placed in the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference④②">float reference</a> according to the rules
    of 'float stacking' and 'float reference growth'.
   </ol>
   <h3 class="heading settled" data-level="8.1" id="float-reference-growth"><span class="secno">8.1. </span><span class="content">Float reference growth</span><a class="self-link" href="#float-reference-growth"></a></h3>
   <p>Float references can grow up to the their `max-height` and `max-width` or their
`available size`, whichever is the lowest, in order to accommodate page floats.</p>
   <h3 class="heading settled" data-level="8.2" id="float-stacking"><span class="secno">8.2. </span><span class="content">Rules for page float stacking</span><a class="self-link" href="#float-stacking"></a></h3>
   <p>Page floats are stacked within a given <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference④③">float reference</a> in the order of their
placement and in the direction of the inline- and flow-directions of the <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#fragmentation-context" id="ref-for-fragmentation-context①③">fragmentation context</a> while <a data-link-type="dfn" href="#not-overlapping" id="ref-for-not-overlapping">not overlapping</a> with any other page
floats with the same <span id="ref-for-float-reference④④">float reference</span> and by keeping a distance N between
the page float’s margin edge and the padding edge of the <span id="ref-for-float-reference④⑤">float reference</span> as well as between the page float’s margin edge and the margin edge of the last
previously placed page float with the same <span id="ref-for-float-reference④⑥">float reference</span> and the same <a class="property" data-link-type="propdesc" href="#propdef-float" id="ref-for-propdef-float④">float</a> value, where N is the <a class="property" data-link-type="propdesc" href="#propdef-float-offset" id="ref-for-propdef-float-offset②">float-offset</a> value of the page float.</p>
   <p>For the purpose of calculating whether enough space is available for a page floats
within the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference④⑦">float reference</a>, it is assumed that the page floats in the block
directions fill the entire line size of the <span id="ref-for-float-reference④⑧">float reference</span> and page floats
in the inline direction fill the entire block size of the <span id="ref-for-float-reference④⑨">float reference</span>.</p>
   <p>For the purpose of placement, page floats in the block-start direction are also
placed at the inline-start edge of the float reference and vice versa, and page
floats in the block-end direction are placed at the inline-end edge of the float
reference and vice versa.</p>
   <p>If the page float has a defined <a class="property" data-link-type="propdesc" href="#propdef-clear" id="ref-for-propdef-clear③">clear</a>-value, then the <a data-link-type="dfn" href="#float-reference" id="ref-for-float-reference⑤⓪">float reference</a> in
which the page float is placed is closed for all subsequent page floats that
floating in the direction specified by the <span class="property" id="ref-for-propdef-clear④">clear</span>-value.</p>
   <p class="issue" id="issue-329c073e"><a class="self-link" href="#issue-329c073e"></a> We can effectively currently float to two corners: inline-start/block-start and
  inline-end/block-end. We should augment this with the option to have a secondary
  float direction to allow basic 2D floating. </p>
   <h2 class="heading settled" data-level="9" id="relation_to_absolutely_positioned_exclusions"><span class="secno">9. </span><span class="content"> Floats and absolutely positioned exclusions</span><a class="self-link" href="#relation_to_absolutely_positioned_exclusions"></a></h2>
   <p>Floats and absolutely positioned exclusions share some common traits, but in the
case of inline floats they are not the same. Floats that are not inline floats
should behave the same as absolutely positioned exclusions with positions and
sizes manually set to prevent overlap between floats and to prevent floats from
moving beyond the edges of the float reference, with the float reference being
grown as much as needed up to its maximum extend to accommodate all containing
floats.</p>
   <h3 class="heading settled" data-level="9.1" id="inline_floats_and_absolutely_positioned_exclusions"><span class="secno">9.1. </span><span class="content"> Differences between inline floats and absolutely positioned elements</span><a class="self-link" href="#inline_floats_and_absolutely_positioned_exclusions"></a></h3>
   <p><em>This section is not normative.</em></p>
   <p> Inline floats and absolutely positioned elements are both out-of-flow elements.
    Absolutely positioned elements that are also exclusions can imitate many of
    the features of floats. </p>
   <p> However, in the case of inline floats, the block formatting context that
    contains them (the <a data-link-type="dfn" href="#float-containing-block-formatting-context" id="ref-for-float-containing-block-formatting-context⑤">float containing block formatting context</a>) is
    required to include the area occupied by the float, which is not a requirement
    for absolutely positioned elements. </p>
   <div class="example" id="example-7d39b010">
    <a class="self-link" href="#example-7d39b010"></a> An inline float inside a <a data-link-type="dfn" href="#float-containing-block-formatting-context" id="ref-for-float-containing-block-formatting-context⑥">float containing block formatting context</a> given
    by a display-inline-block element. The element, which has a green border, is
    expanded to include the brown float. 
<pre><code>&lt;style>
.float {
  float: left;
  margin: 5px;
}
.border {
    border: 3px solid black;
    margin: 5px;
}
#outer {
    border: 1px solid green;
    display: inline-block;
}
canvas {
    background-color: brown;
}
p {
  margin: 5px;
}
&lt;/style>
&lt;div id="outer">
    &lt;p class="border">
        &lt;span class="float border">
            &lt;canvas width="100" height="100"/>
        &lt;/span>
        First paragraph.
    &lt;/p>
    &lt;p class="border">
        Second paragraph and some more text.
    &lt;/p>
&lt;/div>
</code></pre>
    <p><img alt="sample rendering" src="images/float_containing_context.png"></p>
    <p>In comparison, the below is the same HTML, but the float is replaced by an
    absolutely positioned element that is also an exclusion. The <a data-link-type="dfn" href="#float-containing-block-formatting-context" id="ref-for-float-containing-block-formatting-context⑦">float
    containing block formatting context</a> is still given by a
    display-inline-block element. However, the element, marked by a green border,
    does not expand to include the brown, absolutely positioned element.</p>
<pre><code>&lt;style>
.float {
    position: absolute;
    top: 8px;
    left: 8px;
    wrap-flow: both;
}
.border {
    border: 3px solid black;
    margin: 5px;
}
#outer {
    border: 1px solid green;
    display: inline-block;
    position: relative;
}
canvas {
    background-color: brown;
}
&lt;/style>
&lt;div id="outer">
    &lt;p class="border">
        &lt;span class="float border">
            &lt;canvas width="100" height="100"/>
        &lt;/span>
        First paragraph.
    &lt;/p>
    &lt;p class="border">
        Second paragraph and some more text.
    &lt;/p>
&lt;/div>
</code></pre>
    <p><img alt="sample rendering" src="images/positioned_containing_context.png"></p>
   </div>
   <h2 class="heading settled" data-level="10" id="overconstrained-page-floats"><span class="secno">10. </span><span class="content">Overconstrained floats</span><a class="self-link" href="#overconstrained-page-floats"></a></h2>
   <p>In many cases, the specified values on these properties cannot be honored.</p>
   <div class="example" id="example-bf15b5e5">
    <a class="self-link" href="#example-bf15b5e5"></a> 
    <p>The number of columns is limited, and high values therefore cannot be honored:</p>
<pre>.figure { float-reference: column; float: top; float-defer: 1000 }
</pre>
   </div>
   <div class="example" id="example-1d05f4ec">
    <a class="self-link" href="#example-1d05f4ec"></a> A narrow screen may only have room for one column, in which case this request
    cannot be honored: 
<pre>.figure { float-reference: column; float: top; float-defer: -5 }
</pre>
   </div>
   <div class="example" id="example-c4f8d915">
    <a class="self-link" href="#example-c4f8d915"></a> In long documents, all content cannot fit on the last page, and this rule
    therefore cannot be honored: 
<pre>p { float-reference: page; float: top; float-defer: last }
</pre>
   </div>
   <p>Floats are processed in the order they appear in the source. However, the
  visual order of floats may not be the same as the source order.</p>
   <div class="example" id="example-89237a4e">
    <a class="self-link" href="#example-89237a4e"></a> Consider this code: 
<pre>.one { float-reference: page; float: top; float-defer: last }
.two { float-reference: column; float: top; clear: column }

&lt;div class=one>&lt;/div>
&lt;div class=two>&lt;/div>
</pre>
    <p>In this example, the first element requests to appear on the last page, while
    the second element requests to appear in the natural column. If the natural
    column of the second element appears on a page before the last page, the second
    element will appear visually before the first.</p>
   </div>
   <div class="example" id="example-b5a76a9b">
    <a class="self-link" href="#example-b5a76a9b"></a> 
    <p>Consider this code:</p>
<pre>.one { float-reference: page; float: top; float-defer: last }
.two { float-reference: page; float: top; clear: page; }

&lt;div class=one>&lt;/div>
&lt;div class=two>&lt;/div>
</pre>
    <p>If all content can fit on one page, the first page will also be the last page.
    The first element is processed first and is placed on top of the first page.
    Then the second element is processed. It requests a clear top, something which is
    not possible on the first page. Therefore, a second page is created and the
    first element is moved there. Even if the first element requests to be on the
    last page, it will not appear there.</p>
   </div>
   <p>When resolving over-constrained layouts, the order of importance for defined
  goals are:</p>
   <ol>
    <li>honor 'clear: top/bottom' 
    <li>honor <a class="property" data-link-type="propdesc" href="#propdef-float-defer" id="ref-for-propdef-float-defer②">float-defer</a> 
    <li>honor 'float: top/bottom' 
    <li>display all content (as described by other CSS properties) 
    <li>keep the number of pages to a minimum 
   </ol>
   <h2 class="no-num heading settled" id="acks"><span class="content"> Acknowledgments</span><a class="self-link" href="#acks"></a></h2>
   <p>This specification is made possible by input from
  Rossen Atanassov,
  Tab Atkins Jr.,
  David Baron,
  Lars Erik Bolstad,
  Bert Bos,
  Mike Bremford,
  Dave Cramer,
  Michael Day,
  Werner Donné,
  Brady Duga,
  James Elmore,
  Elika Etemad,
  Michel Fortin,
  Daniel Glazman,
  Melinda Grant,
  Ian Hickson,
  Laurens Holst,
  Brad Kemper,
  Toru Kawakubo,
  Rune Lillesveen,
  Peter Linss,
  Cameron McCormack,
  Paul E. Merrell,
  Del Merritt,
  Markus Mielke,
  Kelly Miller,
  Alex Mogilevsky,
  Peter Moulder,
  Shinyu Murakami,
  Michel Onoff,
  Anton Prowse,
  Liam R E Quin,
  Jacob Grundtvig Refstrup,
  Florian Rivoal,
  Christian Roth,
  Allan Sandfeld Jensen,
  Simon Sapin,
  Alan Stearns,
  Morten Stenshorne,
  Philip Taylor,
  Ian Tindale,
  Ladd Van Tol,
  Lea Verou,
  Tarquin (Mark) Wilton-Jones,
  Steve Zilles,
  Tantek Çelik
  and the CSS Working Group members.</p>
  </main>
  <h2 class="no-ref no-num heading settled" id="conformance"><span class="content"> Conformance</span><a class="self-link" href="#conformance"></a></h2>
  <h3 class="heading settled" id="document-conventions"><span class="content"> Document conventions</span><a class="self-link" href="#document-conventions"></a></h3>
  <p>Conformance requirements are expressed with a combination of
	descriptive assertions and RFC 2119 terminology. The key words “MUST”,
	“MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”,
	“RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this
	document are to be interpreted as described in RFC 2119.
	However, for readability, these words do not appear in all uppercase
	letters in this specification. </p>
  <p>All of the text of this specification is normative except sections
	explicitly marked as non-normative, examples, and notes. <a data-link-type="biblio" href="#biblio-rfc2119">[RFC2119]</a> </p>
  <p>Examples in this specification are introduced with the words “for example”
	or are set apart from the normative text with <code>class="example"</code>,
	like this: </p>
  <div class="example" id="example-ae2b6bc0">
   <a class="self-link" href="#example-ae2b6bc0"></a> 
   <p>This is an example of an informative example. </p>
  </div>
  <p>Informative notes begin with the word “Note” and are set apart from the
	normative text with <code>class="note"</code>, like this: </p>
  <p class="note" role="note">Note, this is an informative note. </p>
  <p>Advisements are normative sections styled to evoke special attention and are
	set apart from other normative text with <code>&lt;strong class="advisement"></code>, like
	this: <strong class="advisement"> UAs MUST provide an accessible alternative. </strong> </p>
  <h3 class="heading settled" id="conform-classes"><span class="content"> Conformance classes</span><a class="self-link" href="#conform-classes"></a></h3>
  <p>Conformance to this specification
	is defined for three conformance classes: </p>
  <dl>
   <dt>style sheet 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#style-sheet">CSS
			style sheet</a>. 
   <dt>renderer 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#user-agent">UA</a> that interprets the semantics of a style sheet and renders
			documents that use them. 
   <dt>authoring tool 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#user-agent">UA</a> that writes a style sheet. 
  </dl>
  <p>A style sheet is conformant to this specification
	if all of its statements that use syntax defined in this module are valid
	according to the generic CSS grammar and the individual grammars of each
	feature defined in this module. </p>
  <p>A renderer is conformant to this specification
	if, in addition to interpreting the style sheet as defined by the
	appropriate specifications, it supports all the features defined
	by this specification by parsing them correctly
	and rendering the document accordingly. However, the inability of a
	UA to correctly render a document due to limitations of the device
	does not make the UA non-conformant. (For example, a UA is not
	required to render color on a monochrome monitor.) </p>
  <p>An authoring tool is conformant to this specification
	if it writes style sheets that are syntactically correct according to the
	generic CSS grammar and the individual grammars of each feature in
	this module, and meet all other conformance requirements of style sheets
	as described in this module. </p>
  <h3 class="heading settled" id="conform-responsible"><span class="content"> Requirements for Responsible Implementation of CSS</span><a class="self-link" href="#conform-responsible"></a></h3>
  <p>The following sections define several conformance requirements
		for implementing CSS responsibly,
		in a way that promotes interoperability in the present and future. </p>
  <h4 class="heading settled" id="conform-partial"><span class="content"> Partial Implementations</span><a class="self-link" href="#conform-partial"></a></h4>
  <p>So that authors can exploit the forward-compatible parsing rules to assign fallback values, <strong>CSS renderers <em>must</em> treat as invalid
		(and <a href="http://www.w3.org/TR/CSS2/conform.html#ignore">ignore as appropriate</a>)
		any at-rules, properties, property values, keywords, and other syntactic constructs
		for which they have no usable level of support</strong>.
		In particular, user agents <em>must not</em> selectively ignore
		unsupported property values and honor supported values in a single multi-value property declaration:
		if any value is considered invalid (as unsupported values must be),
		CSS requires that the entire declaration be ignored. </p>
  <h4 class="heading settled" id="conform-future-proofing"><span class="content"> Implementations of Unstable and Proprietary Features</span><a class="self-link" href="#conform-future-proofing"></a></h4>
  <p>To avoid clashes with future stable CSS features,
		the CSSWG recommends <a href="http://www.w3.org/TR/CSS/#future-proofing">following best practices</a> for the implementation of <a href="http://www.w3.org/TR/CSS/#unstable">unstable</a> features and <a href="http://www.w3.org/TR/CSS/#proprietary-extension">proprietary extensions</a> to CSS. </p>
  <h4 class="heading settled" id="conform-testing"><span class="content"> Implementations of CR-level Features</span><a class="self-link" href="#conform-testing"></a></h4>
  <p>Once a specification reaches the Candidate Recommendation stage,
		implementers should release an <a data-link-type="dfn" href="http://www.w3.org/TR/CSS/#vendor-prefix">unprefixed</a> implementation
		of any CR-level feature they can demonstrate
		to be correctly implemented according to spec,
		and should avoid exposing a prefixed variant of that feature. </p>
  <p>To establish and maintain the interoperability of CSS across
		implementations, the CSS Working Group requests that non-experimental
		CSS renderers submit an implementation report (and, if necessary, the
		testcases used for that implementation report) to the W3C before
		releasing an unprefixed implementation of any CSS features. Testcases
		submitted to W3C are subject to review and correction by the CSS
		Working Group. </p>
  <p>
   Further information on submitting testcases and implementation reports
		can be found from on the CSS Working Group’s website at <a href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
		Questions should be directed to the <a href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a> mailing list. 
<script src="https://www.w3.org/scripts/TR/2016/fixup.js"></script>
  </p>
  <h2 class="no-num no-ref heading settled" id="index"><span class="content">Index</span><a class="self-link" href="#index"></a></h2>
  <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="content">Terms defined by this specification</span><a class="self-link" href="#index-defined-here"></a></h3>
  <ul class="index">
   <li><a href="#valdef-clear-all">all</a><span>, in §4</span>
   <li>
    block-end
    <ul>
     <li><a href="#valdef-clear-block-end">value for clear</a><span>, in §4</span>
     <li><a href="#valdef-float-block-end">value for float</a><span>, in §3.2</span>
    </ul>
   <li>
    block-start
    <ul>
     <li><a href="#valdef-clear-block-start">value for clear</a><span>, in §4</span>
     <li><a href="#valdef-float-block-start">value for float</a><span>, in §3.2</span>
    </ul>
   <li><a href="#valdef-clear-both">both</a><span>, in §4</span>
   <li><a href="#valdef-clear-both-block">both-block</a><span>, in §4</span>
   <li><a href="#valdef-clear-both-inline">both-inline</a><span>, in §4</span>
   <li>
    bottom
    <ul>
     <li><a href="#valdef-clear-bottom">value for clear</a><span>, in §4</span>
     <li><a href="#valdef-float-bottom">value for float</a><span>, in §3.2</span>
    </ul>
   <li><a href="#propdef-clear">clear</a><span>, in §4</span>
   <li><a href="#valdef-float-reference-column">column</a><span>, in §3.1</span>
   <li><a href="#propdef-float">float</a><span>, in §3.2</span>
   <li><a href="#float">Float</a><span>, in §2</span>
   <li><a href="#float-anchor">Float anchor</a><span>, in §2</span>
   <li><a href="#float-block-formatting-context">Float block formatting context</a><span>, in §2</span>
   <li><a href="#float-containing-block-formatting-context">Float containing block formatting context</a><span>, in §2</span>
   <li><a href="#propdef-float-defer">float-defer</a><span>, in §5.1</span>
   <li><a href="#propdef-float-offset">float-offset</a><span>, in §7</span>
   <li><a href="#propdef-float-reference">float-reference</a><span>, in §3.1</span>
   <li><a href="#float-reference">Float reference</a><span>, in §2</span>
   <li><a href="#initial-float-reference">Initial float reference</a><span>, in §2</span>
   <li><a href="#valdef-float-reference-inline">inline</a><span>, in §3.1</span>
   <li>
    inline-end
    <ul>
     <li><a href="#valdef-clear-inline-end">value for clear</a><span>, in §4</span>
     <li><a href="#valdef-float-inline-end">value for float</a><span>, in §3.2</span>
    </ul>
   <li><a href="#inline-float">Inline float</a><span>, in §2</span>
   <li>
    inline-start
    <ul>
     <li><a href="#valdef-clear-inline-start">value for clear</a><span>, in §4</span>
     <li><a href="#valdef-float-inline-start">value for float</a><span>, in §3.2</span>
    </ul>
   <li>
    left
    <ul>
     <li><a href="#valdef-clear-left">value for clear</a><span>, in §4</span>
     <li><a href="#valdef-float-left">value for float</a><span>, in §3.2</span>
    </ul>
   <li><a href="#valdef-float-none">none</a><span>, in §3.2</span>
   <li><a href="#not-overlapping">Not overlapping</a><span>, in §2</span>
   <li><a href="#valdef-float-reference-page">page</a><span>, in §3.1</span>
   <li><a href="#page-float">Page float</a><span>, in §2</span>
   <li><a href="#valdef-float-reference-region">region</a><span>, in §3.1</span>
   <li>
    right
    <ul>
     <li><a href="#valdef-clear-right">value for clear</a><span>, in §4</span>
     <li><a href="#valdef-float-right">value for float</a><span>, in §3.2</span>
    </ul>
   <li><a href="#valdef-float-snap-block">snap-block</a><span>, in §3.2</span>
   <li><a href="#funcdef-float-snap-block">snap-block()</a><span>, in §3.2</span>
   <li><a href="#valdef-float-snap-inline">snap-inline</a><span>, in §3.2</span>
   <li><a href="#funcdef-float-snap-inline">snap-inline()</a><span>, in §3.2</span>
   <li>
    top
    <ul>
     <li><a href="#valdef-clear-top">value for clear</a><span>, in §4</span>
     <li><a href="#valdef-float-top">value for float</a><span>, in §3.2</span>
    </ul>
  </ul>
  <aside class="dfn-panel" data-for="term-for-fragmentation-container">
   <a href="https://drafts.csswg.org/css-break-4/#fragmentation-container">https://drafts.csswg.org/css-break-4/#fragmentation-container</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-fragmentation-container">1. Overview</a> <a href="#ref-for-fragmentation-container①">(2)</a>
    <li><a href="#ref-for-fragmentation-container②">5. Deferring page floats</a> <a href="#ref-for-fragmentation-container③">(2)</a>
    <li><a href="#ref-for-fragmentation-container④">5.1. The float-defer property</a> <a href="#ref-for-fragmentation-container⑤">(2)</a> <a href="#ref-for-fragmentation-container⑥">(3)</a> <a href="#ref-for-fragmentation-container⑦">(4)</a> <a href="#ref-for-fragmentation-container⑧">(5)</a> <a href="#ref-for-fragmentation-container⑨">(6)</a> <a href="#ref-for-fragmentation-container①⓪">(7)</a> <a href="#ref-for-fragmentation-container①①">(8)</a> <a href="#ref-for-fragmentation-container①②">(9)</a> <a href="#ref-for-fragmentation-container①③">(10)</a> <a href="#ref-for-fragmentation-container①④">(11)</a> <a href="#ref-for-fragmentation-container①⑤">(12)</a>
    <li><a href="#ref-for-fragmentation-container①⑥">8. Page float placement</a> <a href="#ref-for-fragmentation-container①⑦">(2)</a> <a href="#ref-for-fragmentation-container①⑧">(3)</a> <a href="#ref-for-fragmentation-container①⑨">(4)</a> <a href="#ref-for-fragmentation-container②⓪">(5)</a> <a href="#ref-for-fragmentation-container②①">(6)</a> <a href="#ref-for-fragmentation-container②②">(7)</a> <a href="#ref-for-fragmentation-container②③">(8)</a> <a href="#ref-for-fragmentation-container②④">(9)</a> <a href="#ref-for-fragmentation-container②⑤">(10)</a> <a href="#ref-for-fragmentation-container②⑥">(11)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-fragmentation-context">
   <a href="https://drafts.csswg.org/css-break-4/#fragmentation-context">https://drafts.csswg.org/css-break-4/#fragmentation-context</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-fragmentation-context">5.1. The float-defer property</a> <a href="#ref-for-fragmentation-context①">(2)</a> <a href="#ref-for-fragmentation-context②">(3)</a> <a href="#ref-for-fragmentation-context③">(4)</a> <a href="#ref-for-fragmentation-context④">(5)</a> <a href="#ref-for-fragmentation-context⑤">(6)</a> <a href="#ref-for-fragmentation-context⑥">(7)</a>
    <li><a href="#ref-for-fragmentation-context⑦">8. Page float placement</a> <a href="#ref-for-fragmentation-context⑧">(2)</a> <a href="#ref-for-fragmentation-context⑨">(3)</a> <a href="#ref-for-fragmentation-context①⓪">(4)</a> <a href="#ref-for-fragmentation-context①①">(5)</a> <a href="#ref-for-fragmentation-context①②">(6)</a>
    <li><a href="#ref-for-fragmentation-context①③">8.2. Rules for page float stacking</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-length-value">
   <a href="https://drafts.csswg.org/css-values-3/#length-value">https://drafts.csswg.org/css-values-3/#length-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-length-value">3.2. The float property</a> <a href="#ref-for-length-value①">(2)</a>
    <li><a href="#ref-for-length-value②">7. The float-offset property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-percentage-value">
   <a href="https://drafts.csswg.org/css-values-3/#percentage-value">https://drafts.csswg.org/css-values-3/#percentage-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-percentage-value">7. The float-offset property</a> <a href="#ref-for-percentage-value①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-comb-comma">
   <a href="https://drafts.csswg.org/css-values-4/#comb-comma">https://drafts.csswg.org/css-values-4/#comb-comma</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-comb-comma">3.2. The float property</a> <a href="#ref-for-comb-comma①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-typedef-length-percentage">
   <a href="https://drafts.csswg.org/css-values-4/#typedef-length-percentage">https://drafts.csswg.org/css-values-4/#typedef-length-percentage</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-length-percentage">7. The float-offset property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-mult-opt">
   <a href="https://drafts.csswg.org/css-values-4/#mult-opt">https://drafts.csswg.org/css-values-4/#mult-opt</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-mult-opt">3.2. The float property</a> <a href="#ref-for-mult-opt①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-comb-one">
   <a href="https://drafts.csswg.org/css-values-4/#comb-one">https://drafts.csswg.org/css-values-4/#comb-one</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-comb-one">3.1. The float-reference property</a> <a href="#ref-for-comb-one①">(2)</a> <a href="#ref-for-comb-one②">(3)</a>
    <li><a href="#ref-for-comb-one③">3.2. The float property</a> <a href="#ref-for-comb-one④">(2)</a> <a href="#ref-for-comb-one⑤">(3)</a> <a href="#ref-for-comb-one⑥">(4)</a> <a href="#ref-for-comb-one⑦">(5)</a> <a href="#ref-for-comb-one⑧">(6)</a> <a href="#ref-for-comb-one⑨">(7)</a> <a href="#ref-for-comb-one①⓪">(8)</a> <a href="#ref-for-comb-one①①">(9)</a> <a href="#ref-for-comb-one①②">(10)</a> <a href="#ref-for-comb-one①③">(11)</a> <a href="#ref-for-comb-one①④">(12)</a> <a href="#ref-for-comb-one①⑤">(13)</a> <a href="#ref-for-comb-one①⑥">(14)</a> <a href="#ref-for-comb-one①⑦">(15)</a> <a href="#ref-for-comb-one①⑧">(16)</a>
    <li><a href="#ref-for-comb-one①⑨">4. 
The clear property</a> <a href="#ref-for-comb-one②⓪">(2)</a> <a href="#ref-for-comb-one②①">(3)</a> <a href="#ref-for-comb-one②②">(4)</a> <a href="#ref-for-comb-one②③">(5)</a> <a href="#ref-for-comb-one②④">(6)</a> <a href="#ref-for-comb-one②⑤">(7)</a> <a href="#ref-for-comb-one②⑥">(8)</a>
    <li><a href="#ref-for-comb-one②⑦">5.1. The float-defer property</a> <a href="#ref-for-comb-one②⑧">(2)</a>
    <li><a href="#ref-for-comb-one②⑨">7. The float-offset property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-direction">
   <a href="https://drafts.csswg.org/css-writing-modes-3/#propdef-direction">https://drafts.csswg.org/css-writing-modes-3/#propdef-direction</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-direction">3.2. The float property</a> <a href="#ref-for-propdef-direction①">(2)</a> <a href="#ref-for-propdef-direction②">(3)</a> <a href="#ref-for-propdef-direction③">(4)</a>
    <li><a href="#ref-for-propdef-direction④">4. 
The clear property</a> <a href="#ref-for-propdef-direction⑤">(2)</a> <a href="#ref-for-propdef-direction⑥">(3)</a> <a href="#ref-for-propdef-direction⑦">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-inline-size">
   <a href="https://drafts.csswg.org/css-writing-modes-4/#inline-size">https://drafts.csswg.org/css-writing-modes-4/#inline-size</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-inline-size">3.2. The float property</a> <a href="#ref-for-inline-size①">(2)</a> <a href="#ref-for-inline-size②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-writing-mode">
   <a href="https://drafts.csswg.org/css-writing-modes-4/#propdef-writing-mode">https://drafts.csswg.org/css-writing-modes-4/#propdef-writing-mode</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-writing-mode">3.2. The float property</a> <a href="#ref-for-propdef-writing-mode①">(2)</a> <a href="#ref-for-propdef-writing-mode②">(3)</a> <a href="#ref-for-propdef-writing-mode③">(4)</a>
    <li><a href="#ref-for-propdef-writing-mode④">4. 
The clear property</a> <a href="#ref-for-propdef-writing-mode⑤">(2)</a> <a href="#ref-for-propdef-writing-mode⑥">(3)</a> <a href="#ref-for-propdef-writing-mode⑦">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-wrap-flow">
   <a href="https://drafts.csswg.org/css-exclusions-1/#propdef-wrap-flow">https://drafts.csswg.org/css-exclusions-1/#propdef-wrap-flow</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-wrap-flow">1. Overview</a>
    <li><a href="#ref-for-propdef-wrap-flow①">6. Wrapping around page floats</a> <a href="#ref-for-propdef-wrap-flow②">(2)</a>
   </ul>
  </aside>
  <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span class="content">Terms defined by reference</span><a class="self-link" href="#index-defined-elsewhere"></a></h3>
  <ul class="index">
   <li>
    <a data-link-type="biblio">[css-break-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-fragmentation-container" style="color:initial">fragmentation container</span>
     <li><span class="dfn-paneled" id="term-for-fragmentation-context" style="color:initial">fragmentation context</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-values-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-length-value" style="color:initial">&lt;length></span>
     <li><span class="dfn-paneled" id="term-for-percentage-value" style="color:initial">&lt;percentage></span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-values-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-comb-comma" style="color:initial">,</span>
     <li><span class="dfn-paneled" id="term-for-typedef-length-percentage" style="color:initial">&lt;length-percentage></span>
     <li><span class="dfn-paneled" id="term-for-mult-opt" style="color:initial">?</span>
     <li><span class="dfn-paneled" id="term-for-comb-one" style="color:initial">|</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-writing-modes-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-propdef-direction" style="color:initial">direction</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-writing-modes-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-inline-size" style="color:initial">inline size</span>
     <li><span class="dfn-paneled" id="term-for-propdef-writing-mode" style="color:initial">writing-mode</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css3-exclusions]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-propdef-wrap-flow" style="color:initial">wrap-flow</span>
    </ul>
  </ul>
  <h2 class="no-num no-ref heading settled" id="references"><span class="content">References</span><a class="self-link" href="#references"></a></h2>
  <h3 class="no-num no-ref heading settled" id="normative"><span class="content">Normative References</span><a class="self-link" href="#normative"></a></h3>
  <dl>
   <dt id="biblio-css-break-4">[CSS-BREAK-4]
   <dd>Rossen Atanassov; Elika Etemad. <a href="https://www.w3.org/TR/css-break-4/">CSS Fragmentation Module Level 4</a>. 18 December 2018. WD. URL: <a href="https://www.w3.org/TR/css-break-4/">https://www.w3.org/TR/css-break-4/</a>
   <dt id="biblio-css-values-3">[CSS-VALUES-3]
   <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-values-3/">CSS Values and Units Module Level 3</a>. 31 January 2019. CR. URL: <a href="https://www.w3.org/TR/css-values-3/">https://www.w3.org/TR/css-values-3/</a>
   <dt id="biblio-css-values-4">[CSS-VALUES-4]
   <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-values-4/">CSS Values and Units Module Level 4</a>. 31 January 2019. WD. URL: <a href="https://www.w3.org/TR/css-values-4/">https://www.w3.org/TR/css-values-4/</a>
   <dt id="biblio-css-writing-modes-3">[CSS-WRITING-MODES-3]
   <dd>Elika Etemad; Koji Ishii. <a href="https://www.w3.org/TR/css-writing-modes-3/">CSS Writing Modes Level 3</a>. 24 May 2018. CR. URL: <a href="https://www.w3.org/TR/css-writing-modes-3/">https://www.w3.org/TR/css-writing-modes-3/</a>
   <dt id="biblio-css-writing-modes-4">[CSS-WRITING-MODES-4]
   <dd>Elika Etemad; Koji Ishii. <a href="https://www.w3.org/TR/css-writing-modes-4/">CSS Writing Modes Level 4</a>. 24 May 2018. CR. URL: <a href="https://www.w3.org/TR/css-writing-modes-4/">https://www.w3.org/TR/css-writing-modes-4/</a>
   <dt id="biblio-css3-exclusions">[CSS3-EXCLUSIONS]
   <dd>Rossen Atanassov; Vincent Hardy; Alan Stearns. <a href="https://www.w3.org/TR/css3-exclusions/">CSS Exclusions Module Level 1</a>. 15 January 2015. WD. URL: <a href="https://www.w3.org/TR/css3-exclusions/">https://www.w3.org/TR/css3-exclusions/</a>
   <dt id="biblio-rfc2119">[RFC2119]
   <dd>S. Bradner. <a href="https://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>. March 1997. Best Current Practice. URL: <a href="https://tools.ietf.org/html/rfc2119">https://tools.ietf.org/html/rfc2119</a>
  </dl>
  <h3 class="no-num no-ref heading settled" id="informative"><span class="content">Informative References</span><a class="self-link" href="#informative"></a></h3>
  <dl>
   <dt id="biblio-css3gcpm">[CSS3GCPM]
   <dd>Dave Cramer. <a href="https://www.w3.org/TR/css-gcpm-3/">CSS Generated Content for Paged Media Module</a>. 13 May 2014. WD. URL: <a href="https://www.w3.org/TR/css-gcpm-3/">https://www.w3.org/TR/css-gcpm-3/</a>
  </dl>
  <h2 class="no-num no-ref heading settled" id="property-index"><span class="content">Property Index</span><a class="self-link" href="#property-index"></a></h2>
  <div class="big-element-wrapper">
   <table class="index">
    <thead>
     <tr>
      <th scope="col">Name
      <th scope="col">Value
      <th scope="col">Initial
      <th scope="col">Applies to
      <th scope="col">Inh.
      <th scope="col">%ages
      <th scope="col">Anim­ation type
      <th scope="col">Canonical order
      <th scope="col">Com­puted value
    <tbody>
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-clear" id="ref-for-propdef-clear⑤">clear</a>
      <td>inline-start | inline-end | block-start | block-end | left | right | top | bottom | none
      <td>none
      <td>block-level elements, floats, regions, pages
      <td>no
      <td>N/A
      <td>discrete
      <td>per grammar
      <td>specified keyword
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-float" id="ref-for-propdef-float⑤">float</a>
      <td>block-start | block-end | inline-start | inline-end | snap-block | &lt;snap-block()> | snap-inline | &lt;snap-inline()> | left | right | top | bottom | none
      <td>none
      <td>all elements.
      <td>no
      <td>N/A
      <td>by computed value type
      <td>per grammar
      <td>as specified
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-float-defer" id="ref-for-propdef-float-defer③">float-defer</a>
      <td>&lt;integer> | last | none
      <td>none
      <td>floats
      <td>no
      <td>N/A
      <td>discrete
      <td>per grammar
      <td>specified keyword or integer
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-float-offset" id="ref-for-propdef-float-offset③">float-offset</a>
      <td>&lt;length> | &lt;percentage>
      <td>0
      <td>floats
      <td>no
      <td>see prose
      <td>by computed value type
      <td>per grammar
      <td>computed &lt;length-percentage> value
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-float-reference" id="ref-for-propdef-float-reference⑤">float-reference</a>
      <td>inline | column | region | page
      <td>inline
      <td>all elements.
      <td>no
      <td>N/A
      <td>discrete
      <td>per grammar
      <td>specified keyword
   </table>
  </div>
  <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content">Issues Index</span><a class="self-link" href="#issues-index"></a></h2>
  <div style="counter-reset:issue">
   <div class="issue"> Page floats as defined here work with different types of fragmentation types
    (columns, regions, pages) as well as container elements. The specification
    is no longer specific to print or to pages.
    At the same time, inline floats and page floats differ in many ways, and it may
    (or may not) be a good idea to separate the two entirely.
    Therefore, the name <em>CSS Page Floats</em> should probably be replaced with
    a more appropriate name. <a href="#issue-f0d0f60c"> ↵ </a></div>
   <div class="issue"> The <a data-link-type="dfn" href="#float-containing-block-formatting-context">float containing block formatting context</a> having the same dimensions
    as the <a data-link-type="dfn" href="#float-reference">float reference</a> means that all floats that are not inline floats
    cannot move outside of their float references. Is this wanted? <a href="#issue-08bce5eb"> ↵ </a></div>
   <div class="issue">
     It is not possible to specify a block element which element to use as the
    reference element. This has been requested. 
    <p>Maybe something like:</p>
<pre><code>&lt;style>
.float {
float-reference: float-container;
}

#container {
float-container: true;
}
&lt;/style>

&lt;div id="container">
&lt;p>First paragraph&lt;span class="float">FLOAT&lt;/span>&lt;/p>

&lt;p>Second paragraph
&lt;span class="inline-block">[&lt;span class="float">FLOAT&lt;/span>] &lt;/span>
And some more text&lt;/p>
&lt;/div>
</code></pre>
    <p>This should float both floats with reference to the &lt;div id="container">
    element, rather than the &lt;P> and inline &lt;SPAN> elements.</p>
     <a href="#issue-f5d44217"> ↵ </a>
   </div>
   <div class="issue"> There is currently no way to float into a combination of directions (top right,
  right top, left bottom, bottom left, etc.). <a href="#issue-fc8e173d"> ↵ </a></div>
   <div class="issue"> Should the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-exclusions-1/#propdef-wrap-flow">wrap-flow</a> really be set to both, or should the flow be restricted
    to only be on one side? <a href="#issue-3c63489c"> ↵ </a></div>
   <div class="issue"> We can effectively currently float to two corners: inline-start/block-start and
  inline-end/block-end. We should augment this with the option to have a secondary
  float direction to allow basic 2D floating. <a href="#issue-329c073e"> ↵ </a></div>
  </div>
  <aside class="dfn-panel" data-for="float">
   <b><a href="#float">#float</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-float">1. Overview</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="inline-float">
   <b><a href="#inline-float">#inline-float</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-inline-float">3.1. The float-reference property</a>
    <li><a href="#ref-for-inline-float①">3.2. The float property</a> <a href="#ref-for-inline-float②">(2)</a>
    <li><a href="#ref-for-inline-float③">4. 
The clear property</a> <a href="#ref-for-inline-float④">(2)</a> <a href="#ref-for-inline-float⑤">(3)</a>
    <li><a href="#ref-for-inline-float⑥">5. Deferring page floats</a>
    <li><a href="#ref-for-inline-float⑦">5.1. The float-defer property</a>
    <li><a href="#ref-for-inline-float⑧">7. The float-offset property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="page-float">
   <b><a href="#page-float">#page-float</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-page-float">3.1. The float-reference property</a> <a href="#ref-for-page-float①">(2)</a> <a href="#ref-for-page-float②">(3)</a>
    <li><a href="#ref-for-page-float③">3.2. The float property</a> <a href="#ref-for-page-float④">(2)</a>
    <li><a href="#ref-for-page-float⑤">4. 
The clear property</a> <a href="#ref-for-page-float⑥">(2)</a>
    <li><a href="#ref-for-page-float⑦">5. Deferring page floats</a>
    <li><a href="#ref-for-page-float⑧">5.1. The float-defer property</a>
    <li><a href="#ref-for-page-float⑨">7. The float-offset property</a> <a href="#ref-for-page-float①⓪">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="float-anchor">
   <b><a href="#float-anchor">#float-anchor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-float-anchor">3. 
Floating to the inline-start/inline-end and block-start/block-end</a> <a href="#ref-for-float-anchor①">(2)</a>
    <li><a href="#ref-for-float-anchor②">3.1. The float-reference property</a> <a href="#ref-for-float-anchor③">(2)</a> <a href="#ref-for-float-anchor④">(3)</a> <a href="#ref-for-float-anchor⑤">(4)</a> <a href="#ref-for-float-anchor⑥">(5)</a> <a href="#ref-for-float-anchor⑦">(6)</a> <a href="#ref-for-float-anchor⑧">(7)</a> <a href="#ref-for-float-anchor⑨">(8)</a> <a href="#ref-for-float-anchor①⓪">(9)</a> <a href="#ref-for-float-anchor①①">(10)</a> <a href="#ref-for-float-anchor①②">(11)</a>
    <li><a href="#ref-for-float-anchor①③">5. Deferring page floats</a>
    <li><a href="#ref-for-float-anchor①④">5.1. The float-defer property</a> <a href="#ref-for-float-anchor①⑤">(2)</a> <a href="#ref-for-float-anchor①⑥">(3)</a> <a href="#ref-for-float-anchor①⑦">(4)</a>
    <li><a href="#ref-for-float-anchor①⑧">8. Page float placement</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="float-containing-block-formatting-context">
   <b><a href="#float-containing-block-formatting-context">#float-containing-block-formatting-context</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-float-containing-block-formatting-context">3.1. The float-reference property</a> <a href="#ref-for-float-containing-block-formatting-context①">(2)</a> <a href="#ref-for-float-containing-block-formatting-context②">(3)</a> <a href="#ref-for-float-containing-block-formatting-context③">(4)</a> <a href="#ref-for-float-containing-block-formatting-context④">(5)</a>
    <li><a href="#ref-for-float-containing-block-formatting-context⑤">9.1. 
Differences between inline floats and absolutely positioned elements</a> <a href="#ref-for-float-containing-block-formatting-context⑥">(2)</a> <a href="#ref-for-float-containing-block-formatting-context⑦">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="initial-float-reference">
   <b><a href="#initial-float-reference">#initial-float-reference</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-initial-float-reference">5. Deferring page floats</a> <a href="#ref-for-initial-float-reference①">(2)</a>
    <li><a href="#ref-for-initial-float-reference②">5.1. The float-defer property</a> <a href="#ref-for-initial-float-reference③">(2)</a> <a href="#ref-for-initial-float-reference④">(3)</a> <a href="#ref-for-initial-float-reference⑤">(4)</a> <a href="#ref-for-initial-float-reference⑥">(5)</a> <a href="#ref-for-initial-float-reference⑦">(6)</a> <a href="#ref-for-initial-float-reference⑧">(7)</a>
    <li><a href="#ref-for-initial-float-reference⑨">8. Page float placement</a> <a href="#ref-for-initial-float-reference①⓪">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="float-reference">
   <b><a href="#float-reference">#float-reference</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-float-reference">1. Overview</a>
    <li><a href="#ref-for-float-reference①">3. 
Floating to the inline-start/inline-end and block-start/block-end</a> <a href="#ref-for-float-reference②">(2)</a>
    <li><a href="#ref-for-float-reference③">3.1. The float-reference property</a> <a href="#ref-for-float-reference④">(2)</a> <a href="#ref-for-float-reference⑤">(3)</a> <a href="#ref-for-float-reference⑥">(4)</a> <a href="#ref-for-float-reference⑦">(5)</a> <a href="#ref-for-float-reference⑧">(6)</a> <a href="#ref-for-float-reference⑨">(7)</a> <a href="#ref-for-float-reference①⓪">(8)</a> <a href="#ref-for-float-reference①①">(9)</a> <a href="#ref-for-float-reference①②">(10)</a> <a href="#ref-for-float-reference①③">(11)</a>
    <li><a href="#ref-for-float-reference①④">3.2. The float property</a> <a href="#ref-for-float-reference①⑤">(2)</a> <a href="#ref-for-float-reference①⑥">(3)</a> <a href="#ref-for-float-reference①⑦">(4)</a> <a href="#ref-for-float-reference①⑧">(5)</a> <a href="#ref-for-float-reference①⑨">(6)</a> <a href="#ref-for-float-reference②⓪">(7)</a> <a href="#ref-for-float-reference②①">(8)</a> <a href="#ref-for-float-reference②②">(9)</a> <a href="#ref-for-float-reference②③">(10)</a> <a href="#ref-for-float-reference②④">(11)</a> <a href="#ref-for-float-reference②⑤">(12)</a> <a href="#ref-for-float-reference②⑥">(13)</a> <a href="#ref-for-float-reference②⑦">(14)</a> <a href="#ref-for-float-reference②⑧">(15)</a> <a href="#ref-for-float-reference②⑨">(16)</a> <a href="#ref-for-float-reference③⓪">(17)</a>
    <li><a href="#ref-for-float-reference③①">4. 
The clear property</a> <a href="#ref-for-float-reference③②">(2)</a> <a href="#ref-for-float-reference③③">(3)</a> <a href="#ref-for-float-reference③④">(4)</a>
    <li><a href="#ref-for-float-reference③⑤">8. Page float placement</a> <a href="#ref-for-float-reference③⑥">(2)</a> <a href="#ref-for-float-reference③⑦">(3)</a> <a href="#ref-for-float-reference③⑧">(4)</a> <a href="#ref-for-float-reference③⑨">(5)</a> <a href="#ref-for-float-reference④⓪">(6)</a> <a href="#ref-for-float-reference④①">(7)</a> <a href="#ref-for-float-reference④②">(8)</a>
    <li><a href="#ref-for-float-reference④③">8.2. Rules for page float stacking</a> <a href="#ref-for-float-reference④④">(2)</a> <a href="#ref-for-float-reference④⑤">(3)</a> <a href="#ref-for-float-reference④⑥">(4)</a> <a href="#ref-for-float-reference④⑦">(5)</a> <a href="#ref-for-float-reference④⑧">(6)</a> <a href="#ref-for-float-reference④⑨">(7)</a> <a href="#ref-for-float-reference⑤⓪">(8)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="not-overlapping">
   <b><a href="#not-overlapping">#not-overlapping</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-not-overlapping">8.2. Rules for page float stacking</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-float-reference">
   <b><a href="#propdef-float-reference">#propdef-float-reference</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-float-reference">3. 
Floating to the inline-start/inline-end and block-start/block-end</a>
    <li><a href="#ref-for-propdef-float-reference①">3.1. The float-reference property</a>
    <li><a href="#ref-for-propdef-float-reference②">8. Page float placement</a> <a href="#ref-for-propdef-float-reference③">(2)</a> <a href="#ref-for-propdef-float-reference④">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-float">
   <b><a href="#propdef-float">#propdef-float</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-float">1. Overview</a>
    <li><a href="#ref-for-propdef-float①">3. 
Floating to the inline-start/inline-end and block-start/block-end</a>
    <li><a href="#ref-for-propdef-float②">3.2. The float property</a>
    <li><a href="#ref-for-propdef-float③">7. The float-offset property</a>
    <li><a href="#ref-for-propdef-float④">8.2. Rules for page float stacking</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="funcdef-float-snap-block">
   <b><a href="#funcdef-float-snap-block">#funcdef-float-snap-block</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-funcdef-float-snap-block">3.2. The float property</a> <a href="#ref-for-funcdef-float-snap-block①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="funcdef-float-snap-inline">
   <b><a href="#funcdef-float-snap-inline">#funcdef-float-snap-inline</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-funcdef-float-snap-inline">3.2. The float property</a> <a href="#ref-for-funcdef-float-snap-inline①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-clear">
   <b><a href="#propdef-clear">#propdef-clear</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-clear">1. Overview</a>
    <li><a href="#ref-for-propdef-clear①">4. 
The clear property</a> <a href="#ref-for-propdef-clear②">(2)</a>
    <li><a href="#ref-for-propdef-clear③">8.2. Rules for page float stacking</a> <a href="#ref-for-propdef-clear④">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-float-defer">
   <b><a href="#propdef-float-defer">#propdef-float-defer</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-float-defer">5. Deferring page floats</a>
    <li><a href="#ref-for-propdef-float-defer①">5.1. The float-defer property</a>
    <li><a href="#ref-for-propdef-float-defer②">10. Overconstrained floats</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-float-offset">
   <b><a href="#propdef-float-offset">#propdef-float-offset</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-float-offset">7. The float-offset property</a> <a href="#ref-for-propdef-float-offset①">(2)</a>
    <li><a href="#ref-for-propdef-float-offset②">8.2. Rules for page float stacking</a>
   </ul>
  </aside>
<script>/* script-dfn-panel */

document.body.addEventListener("click", function(e) {
    var queryAll = function(sel) { return [].slice.call(document.querySelectorAll(sel)); }
    // Find the dfn element or panel, if any, that was clicked on.
    var el = e.target;
    var target;
    var hitALink = false;
    while(el.parentElement) {
        if(el.tagName == "A") {
            // Clicking on a link in a <dfn> shouldn't summon the panel
            hitALink = true;
        }
        if(el.classList.contains("dfn-paneled")) {
            target = "dfn";
            break;
        }
        if(el.classList.contains("dfn-panel")) {
            target = "dfn-panel";
            break;
        }
        el = el.parentElement;
    }
    if(target != "dfn-panel") {
        // Turn off any currently "on" or "activated" panels.
        queryAll(".dfn-panel.on, .dfn-panel.activated").forEach(function(el){
            el.classList.remove("on");
            el.classList.remove("activated");
        });
    }
    if(target == "dfn" && !hitALink) {
        // open the panel
        var dfnPanel = document.querySelector(".dfn-panel[data-for='" + el.id + "']");
        if(dfnPanel) {
            dfnPanel.classList.add("on");
            var rect = el.getBoundingClientRect();
            dfnPanel.style.left = window.scrollX + rect.right + 5 + "px";
            dfnPanel.style.top = window.scrollY + rect.top + "px";
            var panelRect = dfnPanel.getBoundingClientRect();
            var panelWidth = panelRect.right - panelRect.left;
            if(panelRect.right > document.body.scrollWidth && (rect.left - (panelWidth + 5)) > 0) {
                // Reposition, because the panel is overflowing
                dfnPanel.style.left = window.scrollX + rect.left - (panelWidth + 5) + "px";
            }
        } else {
            console.log("Couldn't find .dfn-panel[data-for='" + el.id + "']");
        }
    } else if(target == "dfn-panel") {
        // Switch it to "activated" state, which pins it.
        el.classList.add("activated");
        el.style.left = null;
        el.style.top = null;
    }

});
</script>